-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix isHidden #1110
Merged
Merged
Fix isHidden #1110
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inancgumus
approved these changes
Nov 23, 2023
3 tasks
ankur22
force-pushed
the
fix/isHidden
branch
from
November 23, 2023 09:47
2fbeab6
to
e223239
Compare
ankur22
force-pushed
the
fixAndRefactor/isHidden
branch
from
November 23, 2023 09:48
ffefbed
to
0ea1057
Compare
ankur22
force-pushed
the
fix/isHidden
branch
from
November 23, 2023 10:58
e223239
to
d65386f
Compare
ankur22
force-pushed
the
fixAndRefactor/isHidden
branch
from
November 23, 2023 15:13
869847b
to
ec212dc
Compare
When runActionOnSelector cannot find a matching element for a given selector, it should defer the boolean response back to the caller as it will be different depending on the context. For isVisible it will be false but for isHidden it will be true.
isHidden will now work with runActionOnSelector just like isVisible. This means that isHidden will not wait for the selector to match on an element before returning the result. It doesn't make sense for the API to wait for an element to match before checking whether it is hidden or not. Note that when no matches are found for the selector, it return true instead of false, which is to say that the element is hidden (or hasn't been found). This makes timeout obsolete for isHidden too, just like it is for isVisible.
To avoid stuttering, avoid wrapping the error again.
ankur22
force-pushed
the
fixAndRefactor/isHidden
branch
from
November 23, 2023 15:14
ec212dc
to
35dc7e9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This fixes
isHidden
so that it does not wait for an element to match with the given selector, and returns straight away. This makes thetimeout
option obsolete.Why?
There are two reason to make this change:
Checklist
Related PR(s)/Issue(s)
Updates: #981