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 WebDriverElement.is_visible() and WebDriverElement.is_not_visible() #1064

Merged
merged 3 commits into from
Jul 6, 2022

Conversation

jsfehler
Copy link
Collaborator

@jsfehler jsfehler commented Jul 5, 2022

This PR deprecates browser.is_element_visible_by_css/xpath, which were never part of the DriverAPI.

This behaviour is moved into the Element. Unlike checking for an element to be present, to check for an element to be visible it must already exist. Thus browser.find_by_css("foo").is_visible() better represents what the user is doing, and most likely what they want to do. This also removes the need for by_css, by_xpath, etc methods, since that decision is already made before the call to the method.

@jsfehler jsfehler merged commit 4563ae3 into cobrateam:master Jul 6, 2022
@jsfehler jsfehler deleted the is_visible branch July 6, 2022 20:21
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.

2 participants