You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
fix(ExpectedConditions): allow ExpectedConditions to handle missing elements
Expected conditions used `presenceOf` and `visibilityOf` to check that it's
referencing elements which actually exist on the page, but there is a race
condition with this strategy: an element could disappear after the
`presenceOf`/`visibilityOf` check but before other checks, causing an error
to be thrown. This PR handles this race condition in two ways:
1. `ElementFinder`'s `isEnabled`, `isDisplayed`, and `isSelected` functions now
return false if no such element exists, rahter than throwing an error
2. `ExpectedConditions`'s `textToBePresent` and `textToBePresentInElementValue`
now check for errors and also return false in those cases
This is a general solution to the problem referenced in
#3777 and
#3958.
0 commit comments