Test Step Selectors
All Options
# standard selectors
- assertVisible: # or another selector-based command
text: "Press here" # optional - matches text or accessibility text
id: "login_submit_button" # optional - matches an element ID
optional: true # defaults to false - skips command element not found
index: 0 # optional - index of the element in a list of matches (0 = first element in list)
point: 50%,50% # optional - relative X/Y coordinates, e.g. center of screen
point: 10,10 # optional - pixel-based coordinates
width: 300 # optional - pixel width of the element to match
height: 300 # optional - pixel height of the element to match
tolerance: 10 # optional - allows a range in width/height, defaults to 0
checked: true # optional - matches elements that are checked (true) or not (false)
focused: true # optional - matches elements that are focused (true) or not (false)
selected: true # optional - matches elements that are selected (true) or not (false)
enabled: true # optional - matches elements that are enabled (true) or not (false)
#relative position selectors
- tapOn: # or another selector-based command
containsChild: # optional - matches element that has a direct child with selector
text: "child text"
containsDescendants: # optional - matches element that has any descendant with these selectors
- text: "text of child"
- text: "text of grandchild"
above: # optional - matches element above this text
text: "some text"
below: # optional - matches element below this text
text: "some text"
rightOf: # optional - matches element to the rightOf this text
text: "some text"
leftOf: # optional - matches element to the leftOf this text
text: "some text"Text Selector
ID Selector
Optional modifier
Picking a single view from multiple matches
Point Selector
Width and Height Selector
Checked Selector
Focused Selector
Selected Selector
Enabled Selector
Relative Position Selectors
Contains Child Selector
Contains Descendants Selector
Above Selector
Below Selector
LeftOf Selector
RightOf Selector
Last updated