This project versioning adheres to Semantic Versioning.
- Improper PHP documentation for
getAttribute()
andgetDomProperty()
. - Unsafe use of
static::
when accessing private property inDesiredCapabilities
. - PHP 8.1 deprecations in the
Cookie
class.
- Docs: Extend
findElement()
/findElements()
method documentation to better explain XPath behavior. - Add
@return
and@param
type annotations to Cookie class to avoid deprecations in PHP 8.1.
RemoteWebElement::getDomProperty()
method to read JavaScript properties of an element (like the value ofinnerHTML
etc.) in W3C mode.WebDriverCommand::newSession()
constructor to create new session command without violating typehints.
- Allow installation of Symfony 6 components.
- PHP 8.1 compatibility.
RemoteWebElement::getLocationOnScreenOnceScrolledIntoView()
was missing polyfill implementation for W3C mode and not working in eg. Safari.
FirefoxOptions
class to simplify passing Firefox capabilities. Usage is covered in our wiki.FirefoxDriver
to easy local start of Firefox instance without a need to start thegeckodriver
process manually. See wiki for usage examples.- Method
ChromeDriver::startUsingDriverService()
to be used for creating ChromeDriver instance with custom service.
- Driver capabilities received from the browser when creating now session were not set to the instance of ChromeDriver (when ChromeDriver::start() was used).
- Deprecate
ChromeDriver::startSession
. However, the method was supposed to be used only internally. - KeyDown and KeyUp actions will throw an exception when not used with modifier keys.
- Support for sending Chrome DevTools Protocol commands (see details in wiki).
- Option to specify type of new window (window or tab) when using
$driver->switchTo()->newWindow()
.
- Actually start ChromeDriver in W3C mode if it is supported by the browser driver. Until now, when it was initialized using
ChromeDriver::start()
, it has always been unintentionally started in OSS mode. - ChromeOptions were ignored when passed to DesiredCapabilities as
ChromeOptions::CAPABILITY_W3C
. - Clicking a block element inside
<a>
element in Firefox (workaround for GeckoDriver bug 1374283).
- Throw
DriverServerDiedException
on local driver process terminating unexpectedly and provide full details of original exception to improve debugging. - Do not require
WEBDRIVER_CHROME_DRIVER
environment variable to be set ifchromedriver
binary is already available via system PATH. - Mark PhantomJS deprecated, as it is no longer developed and maintained.
- Deprecate
RemoteWebDriver::newWindow()
in favor of$driver->switchTo()->newWindow()
. - Don't escape slashes in CURL exception message to improve readability.
- Support of SameSite cookie property.
- Command
RemoteWebDriver::newWindow()
for W3C mode to open new top-level browsing context (aka window). - PHP 8.0 support.
- Make
alertIsPresent()
condition working in W3C mode. RemoteWebDriver::create()
cannot be used without providing the second parameter (which is in fact optional).ChromeDriver::start()
starts in inconsistent state mixing W3C/OSS mode.- Modifier keys are not released when sending NULL key in GeckoDriver (workaround for GeckoDriver bug 1494661).
- Do not set unnecessary
binary
value ofgoog:chromeOptions
while keep the object in proper data type required by ChromeDriver.
- Reimplement element
equals()
method to be working in W3C mode. - New instance of
RemoteWebDriver
created viacreateBySessionID()
by default expects W3C mode. This could be disabled using fifth parameter ofcreateBySessionID()
. - Disable JSON viewer in Firefox to let JSON response be rendered as-is.
- Properly read fifth parameter whether W3C compliant instance should be created when using
createBySessionID()
. - Creating of Firefox profile with libzip 1.6+ (eg. on Mac OS Catalina).
- Accept array as possible input to
sendKeys()
method. (Unintentional BC break in 1.8.0.) - Use relative offset when moving mouse pointer in W3C WebDriver mode.
- Experimental W3C WebDriver protocol support. The protocol will be used automatically when remote end (like Geckodriver, newer Chromedriver etc.) supports it.
getStatus()
method ofRemoteWebDriver
to get information about remote-end readiness to create new sessions.takeElementScreenshot()
method ofRemoteWebElement
to do the obvious - take screenshot of the particular element.- Support for sending custom commands via
executeCustomCommand()
. See wiki for more information.
- The repository was migrated to
php-webdriver/php-webdriver
. - The Packagist package was renamed to
php-webdriver/webdriver
and the originalfacebook/webdriver
was marked as abandoned. - Revert no longer needed workaround for Chromedriver bug 2943.
- Allow installation of Symfony 5 components.
- Rename environment variable used to pass path to ChromeDriver executable from
webdriver.chrome.driver
toWEBDRIVER_CHROME_DRIVER
. However the old one also still works to keep backward compatibility - If subdirectories in a path to screenshot destination does not exists (using
takeScreenshot()
ortakeElementScreenshot()
methods), they are automatically created. - When zip archive cannot be created during file upload, throw an exception instead of silently returning false.
WebDriverNavigation
andEventFiringWebDriverNavigation
now both implement newWebDriverNavigationInterface
.
WebDriverExpectedCondition::presenceOfElementLocated()
works correctly when used withinWebDriverExpectedCondition::not()
.- Improper behavior of Microsoft Edge when retrieving all cookies via
getCookies()
(it was causing fatal error when there were no cookies). - Avoid "path is not canonical" error when uploading file to Chromedriver.
- Error
Call to a member function toArray()
if capabilities were already converted to an array. - Temporarily do not send capabilities to disable W3C WebDriver protocol when BrowserStack hub is used.
WebDriverCheckboxes
andWebDriverRadios
helper classes to simplify interaction with checkboxes and radio buttons.
- Stop sending null values in Cookie object, which is against the protocol and may cause request to remote ends to fail.
- Force Chrome to not use W3C WebDriver protocol.
- Add workaround for Chromedriver bug 2943 which breaks the protocol in Chromedriver 75.
- Connection and request timeouts could be specified also when creating RemoteWebDriver from existing session ID.
- Update PHPDoc for functions that return static instances of a class.
- Disable sending 'Expect: 100-Continue' header with POST requests, as they may more easily fail when sending via eg. squid proxy.
- Drop PHP 5.5 support, the minimal required version of PHP is now PHP 5.6.
- Allow installation of Symfony 4 components.
- Add a
visibilityOfAnyElementsLocated()
method toWebDriverExpectedCondition
.
- Do not throw notice
Constant CURLOPT_CONNECTTIMEOUT_MS already defined
.
- Cookies should now be set using
Cookie
value object instead of an array when passed to toaddCookie()
method ofWebDriverOptions
. - Cookies retrieved using
getCookieNamed()
andgetCookies()
methods ofWebDriverOptions
are now encapsulated inCookie
object instead of an plain array. The object implementsArrayAccess
interface to provide backward compatibility. ext-zip
is now specified as required dependency in composer.json (but the extension was already required by the code, though).- Deprecate
WebDriverCapabilities::isJavascriptEnabled()
method. - Deprecate
textToBePresentInElementValue
expected condition in favor ofelementValueContains
.
- Do not throw fatal error when
null
is passed tosendKeys()
.
- Added
getCapabilities()
method ofRemoteWebDriver
, to retrieve actual capabilities acknowledged by the remote driver on startup. - Added option to pass required capabilities when creating
RemoteWebDriver
. (So far only desired capabilities were supported.) - Added new expected conditions:
urlIs
- current URL exactly equals given valueurlContains
- current URL contains given texturlMatches
- current URL matches regular expressiontitleMatches
- current page title matches regular expressionelementTextIs
- text in element exactly equals given textelementTextContains
(as an alias fortextToBePresentInElement
) - text in element contains given textelementTextMatches
- text in element matches regular expressionnumberOfWindowsToBe
- number of opened windows equals given number
- Possibility to select option of
<select>
by its partial text (usingselectByVisiblePartialText()
). XPathEscaper
helper class to quote XPaths containing both single and double quotes.WebDriverSelectInterface
, to allow implementation of custom select-like components, eg. those not built around and actual select tag.
Symfony\Process
is used to start local WebDriver processes (when browsers are run directly, without Selenium server) to workaround some PHP bugs and improve portability.- Clarified meaning of selenium server URL variable in methods of
RemoteWebDriver
class. - Deprecated
setSessionID()
andsetCommandExecutor()
methods ofRemoteWebDriver
class; these values should be immutable and thus passed only via constructor. - Deprecated
WebDriverExpectedCondition::textToBePresentInElement()
in favor ofelementTextContains()
. - Throw an exception when attempting to deselect options of non-multiselect (it already didn't have any effect, but was silently ignored).
- Optimize performance of
(de)selectByIndex()
andgetAllSelectedOptions()
methods ofWebDriverSelect
when used with non-multiple select element.
- XPath escaping in
select*()
anddeselect*()
methods ofWebDriverSelect
.
- Added initial support of remote Microsoft Edge browser (but starting local EdgeDriver is still not supported).
- Utilize late static binding to make eg.
WebDriverBy
andDesiredCapabilities
classes easily extensible. - PHP version at least 5.5 is required.
- Fixed incompatibility with Appium, caused by redundant params present in requests to Selenium server.
- Fixed FirefoxProfile to support installation of extensions with custom namespace prefix in their manifest file.
- Comply codestyle with PSR-2.
- Added ext-curl to composer.json.
- Added CHANGELOG.md.
- Added CONTRIBUTING.md with information and rules for contributors.
- Fixed strict standards error in
ChromeDriver
. - Added unit tests for
WebDriverCommand
andDesiredCapabilities
. - Fixed retrieving temporary path name in
FirefoxDriver
whenopen_basedir
restriction is in effect.
- FirefoxProfile improved - added possibility to set RDF file and to add datas for extensions.
- Fixed setting 0 second timeout of
WebDriverWait
.