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

Check for full visibility #249

Open
jsha opened this issue Jan 26, 2022 · 1 comment
Open

Check for full visibility #249

jsha opened this issue Jan 26, 2022 · 1 comment

Comments

@jsha
Copy link

jsha commented Jan 26, 2022

We should have a check for "this element is fully visible," where "visible" means "fully in the viewport, and not obscured by other elements."

We might be able to do this with elem.getClientBoundingRect(), and checking (a) that the bounding rect is within the viewport, and (b) checking each corner of the element with https://developer.mozilla.org/en-US/docs/Web/API/Document/elementFromPoint, to ensure that it is the element returned (i.e. there's nothing stacked on top).

@GuillaumeGomez
Copy link
Owner

There could still be elements not covering the corners but still being over the element we're checking full visibility for. I think it's a very common problem for web GUI tests actually.

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

2 participants