Relational Selectors
Identify elements by position (above, below, leftOf, rightOf) or parent-child relationships (containsChild, childOf, containsDescendants).
Last updated
# Tap the view to the right of an input field
- tapOn:
rightOf:
id: input_text
# Tap the view to the left of a specific phrase
- tapOn:
leftOf: I agree to the terms- assertVisible:
text: Top Thing
above:
text: Middle Thing
above:
text: Bottom Thing# Tap the container that directly contains the text "Order 12345"
- tapOn:
containsChild:
text: Order 12345# Tap the Delete button inside the Basket
- tapOn:
text: Delete
childOf:
id: basket_container# Find a list item that contains both a specific product name and a price
- assertVisible:
id: list_item
containsDescendants:
- text: Wireless Headphones
- text: $99.99