oleg-andreyev / MinkPhpWebDriver

Webdriver driver for Mink framework
MIT License
8 stars 9 forks source link

clickOnElement should use WebDriverElement::click #3

Closed andrewnicols closed 4 years ago

andrewnicols commented 4 years ago

Clicking on an element is defined in both the W3C specification, and the JsonWire specification as a command in its own right.

https://www.w3.org/TR/webdriver/#element-click https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclick

It is incorrect to use the mouse action to move to the location and perform the click as this approach does not wait for the page to unload before starting the next action.

On some pages this can lead to Mink moving on to the next step before the page completes the unload, leading to random failures.

oleg-andreyev commented 4 years ago

@andrewnicols thanks for your contribution, I appreciate it!