forked from mobile-dev-inc/maestro-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GITBOOK-273: change request with no subject merged in GitBook
- Loading branch information
1 parent
e3baab1
commit 92ae525
Showing
17 changed files
with
69 additions
and
75 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
# extendedWaitUntil | ||
|
||
Waits until an element becomes visible. Fails if the element is not visible after the timeout expires. This command will complete as soon as element becomes visible and is not going to wait for timeout to expire. | ||
Waits until an element becomes visible. Fails if the element is not visible after the timeout expires. This command will complete as soon as element becomes visible and is not going to wait for timeout to expire.  | ||
|
||
For an exhaustive list of selectors that can be used, please refer to the [Selectors](../selectors.md) page. | ||
|
||
Example usage: | ||
|
||
```yaml | ||
- extendedWaitUntil: | ||
visible: Element # Same input as in assertVisible or tapOn | ||
visible: | ||
id: "elementId" # or any other selector | ||
timeout: 10000 # Timeout in milliseconds | ||
``` | ||
Similarly, it can wait until an element disappears: | ||
```yaml | ||
- extendedWaitUntil: | ||
notVisible: Element | ||
notVisible: | ||
id: "elementId" # or any other selector | ||
timeout: 10000 | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Selectors | ||
|
||
Commands that interact with a view,  | ||
|
||
For commands that interact with a view, such as tapOn, assertVisible, copyTextFrom among others, require the view to be found using what is called a _selector_. There are many different selectors available for usage: | ||
|
||
```yaml | ||
- tapOn: # or any other command that works with selectors | ||
text: "Text" # (optional) Finds text that matches regexp | ||
id: "id" # (optional) Finds id that matches regexp | ||
index: 0 # (optional) 0-based index of the view to select among those that match all other criteria | ||
width: 100 # (optional) Finds element of a given width | ||
height: 100 # (optional) Finds element of a given height | ||
tolerance: 10 # (optional) Tolerance to apply when comparing width and height | ||
enabled: true # (optional) Searches for view with a given "enabled" state | ||
checked: true # (optional) Searches for view with a given "checked" state | ||
focused: true # (optional) Searches for view with a given "focused" state | ||
selected: true # (optional) Searches for view with a given "selected" state | ||
optional: false # (default: false) If set to true, test won't fail if view can't be found | ||
``` | ||
### Relative Position selectors | ||
Apart from the selectors mentioned above, Maestro is also able to select views using their relative position (i.e. "below another view", or "contains child") | ||
```yaml | ||
- tapOn: # or any other command that works with selectors | ||
below: "View above that has this text" # This will match view *above* that has the given text | ||
above: | ||
id: "view_below_id" # This will match a view *below* that has the given id | ||
leftOf: "View to the right has this text" | ||
rightOf: "View to the left has this text" | ||
containsChild: "Text in a child view" # This will match a view that has a *direct* child view with the given text | ||
``` |
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
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