-
-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix _gather_elements in User class to only return visible elements (#…
…4057) When using `User` simulation methods such as `should_see`, `should_not_see`, or `find`, the `visible` state of the element is ignored. This can result in unexpected behavior. For example, if an element is invisible, but `should_see` or `find` is used, the visibility state is disregarded. Consider a scenario where an element is created and set to be invisible, but becomes visible at a later point. In the current version, testing with `should_see` would always pass because the 'visible' state is ignored. Ideally, `should_see` should raise an error if the element is not visible. This behavior is similar for `find` and `should_not_see`, where the visibility state is not taken into account during the test. This is fixed by only returning visible elements in `_gather_elements`. Additionally for better debugging the `__str__` method of `Element` includes the `visible` state of the element. --------- Co-authored-by: Moritz Erlacher <[email protected]>
- Loading branch information
Showing
3 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
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
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
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