Also, change:
get_real_timeout(30000)
to:
get_real_timeout(30) * 1000
because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
The W3C Specification does not require that a NodeElement be in the
current viewport before triggering a mouseOver. As a result the
mouseOver will generate an Exception because the element is not in the
viewport, and the X/Y co-ordinates are invalid.
To handle this the node is scrolled into view.
Normalise switching of window contexts by setting the main window name
to a null.
Where the window has no name (null/empty), then the root context is
selected.
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.
Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
* The fact that non-existing strings are returned in certain format
starting with the bracket, is kind of side debugging effect. The value
is really undefined and should not be relied upon.
* The string could actually exist and be worded so that its first
character is also the square bracket.
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.
The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
This commit updates the following steps to use the
`the_attribute_of_should_be_set` step under the hood:
- the [element] [type] should be disabled
- the [element] [type] should be enabled
- the [element] [type] should be readonly
- the [element] [type] should not be readonly
This reduces unnecssary code duplication.