Touch interactions
Targeting Elements
Element Attributes
Attribute
Description
Attribute
Description
// tap on an element by text
await session.tap({
element: {
attributes: {
text: "OK"
}
}
})
// tap on an element by accessibilityIdentifier
await session.tap({
element: {
attributes: {
accessibilityIdentifier: "dialog-confirm-button"
}
}
})
// tap on an element by *both* text and accessibilityIdentifier
await session.tap({
element: {
attributes: {
text: "OK",
accessibilityIdentifier: "dialog-confirm-button"
}
}
})Best Practices
iOS
Android
React Native
Sample
Methods
findElement
findElements
swipe
By position
By element
Complex Gestures
tap
By position or coordinate
By element
Timeouts
Last updated