-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 isPresent
command to new Element API.
#4216
Add isPresent
command to new Element API.
#4216
Conversation
Status
|
There are some failing tests. Not sure if it is due to the changes made here. Can you help take a look? Thank you! |
@pujagani yes, fixed those. There was a missing check for outofbounds index. |
I think the test that is failing is flakey. I can't see a test for this change can we add one? |
@garg3133 @AutomatedTester ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posted a few reviews below. Otherwise, looks good!
@dikwickley Can you please fix this PR and remove all the unnecessary changes from here? The file changes have gone up to 90 files here. |
8c95d8c
to
66faef3
Compare
isPresent
command.isPresent
command to new Element API.
Co-authored-by: Priyansh Garg <[email protected]>
Fixes: dikwickley/gsoc24#2
Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.
The isPresent command was quite tricky as there were few edge cases we had to solve.
The main one being when the element in not present, we don't want to show the Timeout Error if there is a isPresent command chained (which should ideally return false).
I solved this by checking if the next sibling of a
find
command is anelementIsPresent
command. It still takes 5 seconds to try to resolve the element.If this approach looks good, I can add some tests for this too.
Sanity for elements that are not present:
examples/tests
directory of the project) and running them.ecosia.js
andduckDuckGo.js
are good examples to work with.features/my-new-feature
orissue/123-my-bugfix
);