-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 isDisplayed()
as an alias command for isVisible()
in new Element API.
#4105
Comments
@garg3133 I have to write just one test case for IsDisplayed() into testIsVisible.js file or just replicate all that are present in that file |
@garg3133 Please have a look at my PR. I have tested the feature and ran the tests similar to isVisible(). Tests are passing for all provided cases. |
Generated a pull request. Completed all the TODO's, also ran tests locally and tried to reproduce the bug after making changes, no error was generated. Please have a look at my PR. @garg3133 |
Assigning this issue to @uditrajput03 as he's the first one to come up with the correct solution for the issue. |
Description of the bug/issue
For the newly added
.isVisible()
command on the new Element API, we should also add.isDisplayed()
as an alias to it, so that we can use eitherbrowser.element().isVisible()
orbrowser.element().isDisplayed()
in our tests..isDisplayed()
is the standard command name in Selenium for checking the "visibility" of an element.Steps to reproduce
Go to
ecosia.js
test inexamples/tests
directory and addbrowser.element('input[name=q]').isDisplayed();
at the top of the first test case (it
block). You will see an error thatbrowser.element(...).isDisplayed is not a function
.But if you replace
isDisplayed()
withisVisible()
it will work fine.So, we need to get
isDisplayed()
command working as well, similar to theisVisible()
command, without the need to add any new file in the codebase.TODO
isDisplayed
as an alias toisVisible
command.isDisplayed
alias to the already presentweb-element/testIsVisible.js
test file.The text was updated successfully, but these errors were encountered: