-
Notifications
You must be signed in to change notification settings - Fork 37
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
Clicking certain coordinates within an element #68
Comments
So it's possible to pass |
@knownasilya it should be possible to build a wrapper around async clickXY(selector, x, y) {
let element = find(selector);
let elementX = element.foobarX;
let elementY = element.foobarY;
let globalX = elementX + x;
let globalY = elementY + y;
await click(element, { x: globalX, y: globalY });
} |
I also lean to think that click should remain "bare metal" and just forward options to the event, since it's pretty easy to create an utility like @Turbo87 did. With async/await and this helpers you can don't need to worry about asynchrony and that helper will work both in acceptance and integration |
I'd like to be able to do something like
click('.my-map', { xOffset: 5, yOffset: 5 })
, since there isn't usually anything to select on to click on a map if you are doing testing that requires drawing on the map, and not clicking existing objects.The text was updated successfully, but these errors were encountered: