1# Changelog
2This project versioning adheres to [Semantic Versioning](http://semver.org/).
3
4## Unreleased
5
6## 1.12.1 - 2022-05-03
7### Fixed
8- Improper PHP documentation for `getAttribute()` and `getDomProperty()`.
9- Unsafe use of `static::` when accessing private property in `DesiredCapabilities`.
10- PHP 8.1 deprecations in the `Cookie` class.
11
12### Changed
13- Docs: Extend `findElement()`/`findElements()` method documentation to better explain XPath behavior.
14- Add `@return` and `@param` type annotations to Cookie class to avoid deprecations in PHP 8.1.
15
16## 1.12.0 - 2021-10-14
17### Added
18- `RemoteWebElement::getDomProperty()` method to read JavaScript properties of an element (like the value of `innerHTML` etc.) in W3C mode.
19- `WebDriverCommand::newSession()` constructor to create new session command without violating typehints.
20
21### Changed
22- Allow installation of Symfony 6 components.
23
24### Fixed
25- PHP 8.1 compatibility.
26
27## 1.11.1 - 2021-05-21
28### Fixed
29- `RemoteWebElement::getLocationOnScreenOnceScrolledIntoView()` was missing polyfill implementation for W3C mode and not working in eg. Safari.
30
31## 1.11.0 - 2021-05-03
32### Added
33- `FirefoxOptions` class to simplify passing Firefox capabilities. Usage is covered [in our wiki](https://github.com/php-webdriver/php-webdriver/wiki/Firefox#firefoxoptions).
34- `FirefoxDriver` to easy local start of Firefox instance without a need to start the `geckodriver` process manually. [See wiki](https://github.com/php-webdriver/php-webdriver/wiki/Firefox#start-directly-using-firefoxdriver-class) for usage examples.
35- Method `ChromeDriver::startUsingDriverService()` to be used for creating ChromeDriver instance with custom service.
36
37### Fixed
38- Driver capabilities received from the browser when creating now session were not set to the instance of ChromeDriver (when ChromeDriver::start() was used).
39
40### Changed
41- Deprecate `ChromeDriver::startSession`. However, the method was supposed to be used only internally.
42- KeyDown and KeyUp actions will throw an exception when not used with modifier keys.
43
44## 1.10.0 - 2021-02-25
45### Added
46- Support for sending Chrome DevTools Protocol commands (see details in [wiki](https://github.com/php-webdriver/php-webdriver/wiki/Chrome#chrome-devtools-protocol-cdp)).
47- Option to specify type of new window (window or tab) when using `$driver->switchTo()->newWindow()`.
48
49### Fixed
50- 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.
51- ChromeOptions were ignored when passed to DesiredCapabilities as `ChromeOptions::CAPABILITY_W3C`.
52- Clicking a block element inside `<a>` element in Firefox (workaround for GeckoDriver bug [1374283](https://bugzilla.mozilla.org/show_bug.cgi?id=1374283)).
53
54### Changed
55- Throw `DriverServerDiedException` on local driver process terminating unexpectedly and provide full details of original exception to improve debugging.
56- Do not require `WEBDRIVER_CHROME_DRIVER` environment variable to be set if `chromedriver` binary is already available via system PATH.
57- Mark PhantomJS deprecated, as it is no longer developed and maintained.
58- Deprecate `RemoteWebDriver::newWindow()` in favor of `$driver->switchTo()->newWindow()`.
59- Don't escape slashes in CURL exception message to improve readability.
60
61## 1.9.0 - 2020-11-19
62### Added
63- Support of SameSite cookie property.
64- Command `RemoteWebDriver::newWindow()` for W3C mode to open new top-level browsing context (aka window).
65- PHP 8.0 support.
66
67## 1.8.3 - 2020-10-06
68### Fixed
69- Make `alertIsPresent()` condition working in W3C mode.
70- `RemoteWebDriver::create()` cannot be used without providing the second parameter (which is in fact optional).
71- `ChromeDriver::start()` starts in inconsistent state mixing W3C/OSS mode.
72- Modifier keys are not released when sending NULL key in GeckoDriver (workaround for GeckoDriver bug [1494661](https://bugzilla.mozilla.org/show_bug.cgi?id=1494661)).
73- Do not set unnecessary `binary` value of `goog:chromeOptions` while keep the object in proper data type required by ChromeDriver.
74
75## 1.8.2 - 2020-03-04
76### Changed
77- Reimplement element `equals()` method to be working in W3C mode.
78- New instance of `RemoteWebDriver` created via `createBySessionID()` by default expects W3C mode. This could be disabled using fifth parameter of `createBySessionID()`.
79- Disable JSON viewer in Firefox to let JSON response be rendered as-is.
80
81### Fixed
82- Properly read fifth parameter whether W3C compliant instance should be created when using `createBySessionID()`.
83- Creating of Firefox profile with libzip 1.6+ (eg. on Mac OS Catalina).
84
85## 1.8.1 - 2020-02-17
86### Fixed
87- Accept array as possible input to `sendKeys()` method. (Unintentional BC break in 1.8.0.)
88- Use relative offset when moving mouse pointer in W3C WebDriver mode.
89
90## 1.8.0 - 2020-02-10
91### Added
92- Experimental W3C WebDriver protocol support. The protocol will be used automatically when remote end (like Geckodriver, newer Chromedriver etc.) supports it.
93- `getStatus()` method of `RemoteWebDriver` to get information about remote-end readiness to create new sessions.
94- `takeElementScreenshot()` method of `RemoteWebElement` to do the obvious - take screenshot of the particular element.
95- Support for sending custom commands via `executeCustomCommand()`. See [wiki](https://github.com/php-webdriver/php-webdriver/wiki/Custom-commands) for more information.
96
97### Changed
98- The repository was migrated to [`php-webdriver/php-webdriver`](https://github.com/php-webdriver/php-webdriver/).
99- The Packagist package was renamed to [`php-webdriver/webdriver`](https://packagist.org/packages/php-webdriver/webdriver) and the original [`facebook/webdriver`](https://packagist.org/packages/facebook/webdriver) was marked as abandoned.
100- Revert no longer needed workaround for Chromedriver bug [2943](https://bugs.chromium.org/p/chromedriver/issues/detail?id=2943).
101- Allow installation of Symfony 5 components.
102- Rename environment variable used to pass path to ChromeDriver executable from `webdriver.chrome.driver` to `WEBDRIVER_CHROME_DRIVER`. However the old one also still works to keep backward compatibility
103- If subdirectories in a path to screenshot destination does not exists (using `takeScreenshot()` or `takeElementScreenshot()` methods), they are automatically created.
104- When zip archive cannot be created during file upload, throw an exception instead of silently returning false.
105- `WebDriverNavigation` and `EventFiringWebDriverNavigation` now both implement new `WebDriverNavigationInterface`.
106
107### Fixed
108- `WebDriverExpectedCondition::presenceOfElementLocated()` works correctly when used within `WebDriverExpectedCondition::not()`.
109- Improper behavior of Microsoft Edge when retrieving all cookies via `getCookies()` (it was causing fatal error  when there were no cookies).
110- Avoid "path is not canonical" error when uploading file to Chromedriver.
111
112## 1.7.1 - 2019-06-13
113### Fixed
114- Error `Call to a member function toArray()` if capabilities were already converted to an array.
115- Temporarily do not send capabilities to disable W3C WebDriver protocol when BrowserStack hub is used.
116
117## 1.7.0 - 2019-06-10
118### Added
119- `WebDriverCheckboxes` and `WebDriverRadios` helper classes to simplify interaction with checkboxes and radio buttons.
120
121### Fixed
122- Stop sending null values in Cookie object, which is against the protocol and may cause request to remote ends to fail.
123
124### Changed
125- Force Chrome to not use W3C WebDriver protocol.
126- Add workaround for Chromedriver bug [2943](https://bugs.chromium.org/p/chromedriver/issues/detail?id=2943) which breaks the protocol in Chromedriver 75.
127
128## 1.6.0 - 2018-05-16
129### Added
130- Connection and request timeouts could be specified also when creating RemoteWebDriver from existing session ID.
131- Update PHPDoc for functions that return static instances of a class.
132
133### Changed
134- Disable sending 'Expect: 100-Continue' header with POST requests, as they may more easily fail when sending via eg. squid proxy.
135
136## 1.5.0 - 2017-11-15
137### Changed
138- Drop PHP 5.5 support, the minimal required version of PHP is now PHP 5.6.
139- Allow installation of Symfony 4 components.
140
141### Added
142- Add a `visibilityOfAnyElementsLocated()` method to `WebDriverExpectedCondition`.
143
144## 1.4.1 - 2017-04-28
145### Fixed
146- Do not throw notice `Constant CURLOPT_CONNECTTIMEOUT_MS already defined`.
147
148## 1.4.0 - 2017-03-22
149### Changed
150- Cookies should now be set using `Cookie` value object instead of an array when passed to to `addCookie()` method of `WebDriverOptions`.
151- Cookies retrieved using `getCookieNamed()` and `getCookies()` methods of `WebDriverOptions` are now encapsulated in `Cookie` object instead of an plain array. The object implements `ArrayAccess` interface to provide backward compatibility.
152- `ext-zip` is now specified as required dependency in composer.json (but the extension was already required by the code, though).
153- Deprecate `WebDriverCapabilities::isJavascriptEnabled()` method.
154- Deprecate `textToBePresentInElementValue` expected condition in favor of `elementValueContains`.
155
156### Fixed
157- Do not throw fatal error when `null` is passed to `sendKeys()`.
158
159## 1.3.0 - 2017-01-13
160### Added
161- Added `getCapabilities()` method of `RemoteWebDriver`, to retrieve actual capabilities acknowledged by the remote driver on startup.
162- Added option to pass required capabilities when creating `RemoteWebDriver`. (So far only desired capabilities were supported.)
163- Added new expected conditions:
164    - `urlIs` - current URL exactly equals given value
165    - `urlContains` - current URL contains given text
166    - `urlMatches` - current URL matches regular expression
167    - `titleMatches` - current page title matches regular expression
168    - `elementTextIs` - text in element exactly equals given text
169    - `elementTextContains` (as an alias for `textToBePresentInElement`) - text in element contains given text
170    - `elementTextMatches` - text in element matches regular expression
171    - `numberOfWindowsToBe` - number of opened windows equals given number
172- Possibility to select option of `<select>` by its partial text (using `selectByVisiblePartialText()`).
173- `XPathEscaper` helper class to quote XPaths containing both single and double quotes.
174- `WebDriverSelectInterface`, to allow implementation of custom select-like components, eg. those not built around and actual select tag.
175
176### Changed
177- `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.
178- Clarified meaning of selenium server URL variable in methods of `RemoteWebDriver` class.
179- Deprecated `setSessionID()` and `setCommandExecutor()` methods of `RemoteWebDriver` class; these values should be immutable and thus passed only via constructor.
180- Deprecated `WebDriverExpectedCondition::textToBePresentInElement()` in favor of `elementTextContains()`.
181- Throw an exception when attempting to deselect options of non-multiselect (it already didn't have any effect, but was silently ignored).
182- Optimize performance of `(de)selectByIndex()` and `getAllSelectedOptions()` methods of `WebDriverSelect` when used with non-multiple select element.
183
184### Fixed
185- XPath escaping in `select*()` and `deselect*()` methods of `WebDriverSelect`.
186
187## 1.2.0 - 2016-10-14
188- Added initial support of remote Microsoft Edge browser (but starting local EdgeDriver is still not supported).
189- Utilize late static binding to make eg. `WebDriverBy` and `DesiredCapabilities` classes easily extensible.
190- PHP version at least 5.5 is required.
191- Fixed incompatibility with Appium, caused by redundant params present in requests to Selenium server.
192
193## 1.1.3 - 2016-08-10
194- Fixed FirefoxProfile to support installation of extensions with custom namespace prefix in their manifest file.
195- Comply codestyle with [PSR-2](http://www.php-fig.org/psr/psr-2/).
196
197## 1.1.2 - 2016-06-04
198- Added ext-curl to composer.json.
199- Added CHANGELOG.md.
200- Added CONTRIBUTING.md with information and rules for contributors.
201
202## 1.1.1 - 2015-12-31
203- Fixed strict standards error in `ChromeDriver`.
204- Added unit tests for `WebDriverCommand` and `DesiredCapabilities`.
205- Fixed retrieving temporary path name in `FirefoxDriver` when `open_basedir` restriction is in effect.
206
207## 1.1.0 - 2015-12-08
208- FirefoxProfile improved - added possibility to set RDF file and to add datas for extensions.
209- Fixed setting 0 second timeout of `WebDriverWait`.
210