Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Support clicking the topmost element at a given pair of coordinates #788

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

u01jmg3
Copy link
Contributor

@u01jmg3 u01jmg3 commented Jun 24, 2020

Normally, to click on an element you would use the standard click() method passing in a common CSS selector.

  • $browser->click('.selector');

However, consider a scenario where you want to click on an overlay which more often that not appears behind or underneath another element. It is highly likely you will run into the dreaded "element is not clickable at point..." error because the topmost element, such as the modal, would unintentionally receive the click rather than the overlay.

It would therefore be useful to be able to click on an element at a given pair of coordinates rather than relying on a selector. This can be achieved by utilising elementFromPoint() under the hood.

  • $browser->clickAtPoint(0, 0); // Included in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants