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

api: add option position to check/uncheck #6153

Merged
merged 1 commit into from Apr 12, 2021

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Apr 8, 2021

Since check/uncheck does click under the hood, sometimes it might need to click at a different position.

One example would be a long label that contains links inside, and clicking in the center happens to hit the link instead of the label itself. Passing position is a possible solution.

References #6057.

Since check/uncheck does click under the hood, sometimes it might
need to click at a different position. One example would be a long
label that contains links inside, and clicking in the center happens
to hit the link instead of the label itself.
Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the added value of this option compared to getting the elements bounding box and doing page.mouse.click(x, y) at the desired point?

@dgozman
Copy link
Contributor Author

dgozman commented Apr 9, 2021

What's the added value of this option compared to getting the elements bounding box and doing page.mouse.click(x, y) at the desired point?

Simplicity! I expect this to be used as page.check('selector', { position: { x: 10, y: 10 } }).

@dgozman dgozman merged commit e81a3c5 into microsoft:master Apr 12, 2021
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.

None yet

2 participants