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

Clarify situation where an element is not meaningfully visible #1632

Open
andrewnicols opened this issue Nov 17, 2021 · 0 comments
Open

Clarify situation where an element is not meaningfully visible #1632

andrewnicols opened this issue Nov 17, 2021 · 0 comments

Comments

@andrewnicols
Copy link

In chapter 12. Elements, section 12.1 Interactability:

An element is in view if it is a member of its own pointer-interactable paint tree, given the pretense that its pointer events are not disabled.

This discusses where an element is visible in any way, however there are many situations where an element is not meaningfully visible. For example where between only 0-1px of the element is visible. In this situation, the pointer-interactable tree produces a DOMRect with a width or height of less than 1px and therefore the element is considered to be in view, and will not be scrolledIntoView at step 5 of the elementClick. Whilst drivers should be able to click, this is much more likely to lead to obscure bugs ([1], [2], [3] for example), and is not representative of how a real user would interact with the browser.

I would suggest that this consider whether an element is meaningfully visible - perhaps by requiring that at least 1px of it be visible for example.

[1] https://bugs.chromium.org/p/chromedriver/issues/detail?id=3682
[2] https://bugs.chromium.org/p/chromedriver/issues/detail?id=3878
[3] https://bugs.chromium.org/p/chromedriver/issues/detail?id=3933

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

No branches or pull requests

1 participant