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

Add support for Element.displayed #38

Merged
merged 4 commits into from
Jul 26, 2023
Merged

Conversation

tristanlabelle
Copy link
Contributor

No description provided.

Copy link
Contributor

@jeffdav jeffdav left a comment

Choose a reason for hiding this comment

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

LGTM.

Can an element be present but not displayed? I'm assuming just expecting findElement to fail isn't a good solution (but we do that in notepad tests: https://github.com/thebrowsercompany/webdriver-swift/blob/main/Tests/WebDriverTests/NotepadTests.swift#L90).

@tristanlabelle
Copy link
Contributor Author

@jeffdav I believe those test for different things. findElement should find anything that exists in the UI tree, displayed probably checks some visible flag or display: none in html. We'll see if this works for @stevenbrix 's scenario.

@tristanlabelle tristanlabelle marked this pull request as ready for review July 26, 2023 18:19
@tristanlabelle
Copy link
Contributor Author

@jeffdav resetting your review now that this is in better shape :)

@stevenbrix
Copy link
Contributor

@jeffdav yeah findElement still works when the element is in the tree but not visible on screen. excited to try this out @tristanlabelle !

@tristanlabelle tristanlabelle merged commit 6f2fa84 into main Jul 26, 2023
1 check passed
@tristanlabelle tristanlabelle deleted the tristan/element-displayed branch July 26, 2023 18:30
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.

3 participants