1.6.0
The main focus of this release is ensuring consistency between all driver implementations.
BC breaks
- The named selector now prefers exact matches over partial matches. Use the
named_partialselector if you want to force doing a partial match. NodeElement::getValuefor checkboxes now returns the value of the field when checked andnullotherwise rather than the checked state (useNodeElement::isCheckedfor that)- Removed the wrapping of any driver-level exception in a MinkException on invalid usage as it was making the code too complex
Deprecations
Element::getSessionhas been deprecated and will be removed in 2.0. Code needing the session should get it from outside rather than from the element.
New features
- Changed
NodeElement::setValueto support any fields rather than only input elements - Added
Element::getOuterHtmlto get the HTML code of the element including itself - Added
Element::waitForto allow retrying some code until it succeeds or the timeout is reached - Added
Element::isValidto check whether an element still exists in the page - Added
Session::getWindowNameandSession::getWindowNamesto get the name of the current and of all windows - Added
Session::maximizeWindowto maximize the window - Added
NodeElement::isSelectedto check whether an<option>is selected - Added
NodeElement::submitFormto allow submitting a form without using a button - Added assertions about the value of an attribute
- Changed
Session::waitto return the condition value rather than nothing - Added the anchor in the assertion on the URL in
WebAssert - Introduced
Behat\Mink\Selector\Xpath\Escaperto allow reusing the XPath escaping. When building your own XPath, using it is prefered over accessing the SelectorsHandler for forward-compatibility with 2.0 (using the SelectorsHandler to escape the locator passed to the named selector is fine as this escaping will need to be removed in 2.0)
Removal
- Removed
hasClassfromDocumentElement(instead of triggering a fatal error when it is used)
Bug fixes
- Fixed the XPath prefixing when searching inside an existing element
- Fixed the matching of the input type in the named selector to be case insensitive according to the HTML spec
- Fixed the name selectors to match on the
placeholderonly for textual inputs - Fixed
NodeElement::getTagNameto ensure that the tag name is lowercase for all drivers - Fixed
Element::hasAttributeto ensure it supports attributes with an empty value - Fixed the
fieldselector to avoid matching inputs with the typesubmitorreset - Changed the button XPath selection to accept
resetbuttons as well - Enforced consistent behavior for drivers on 4xx and 5xx response to return the response rather than throwing an exception
- Made
Session::executeScriptcompatible across drivers by ensuring they all support the same syntaxes for the JS expression - Made
Session::evaluateScriptcompatible across drivers by ensuring they all support the same syntaxes for the JS expression - Changed ElementNotFoundException to extend from ExpectationException
Testsuite
- Refactored the driver testsuite entirely and expand it to cover drivers entirely (covering many more cases to ensure consistency)
- Added testing on HHVM