android_wait_for_element
Wait for a UI element to appear on Android screen by polling the accessibility tree. Use after navigation to ensure the screen is ready before interacting with elements.
Instructions
Wait for a UI element to appear on Android screen. Polls the accessibility tree until the element is found or timeout is reached. Use this FIRST after navigation to ensure screen is ready, then use find_element + tap.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Exact text match for the element | |
| textContains | No | Partial text match (case-insensitive) | |
| contentDesc | No | Exact content-description match | |
| contentDescContains | No | Partial content-description match (case-insensitive) | |
| resourceId | No | Resource ID match (e.g., 'com.app:id/button' or just 'button') | |
| index | No | If multiple elements match, select the nth one (0-indexed, default: 0) | |
| timeoutMs | No | Maximum time to wait in milliseconds (default: 10000) | |
| pollIntervalMs | No | Time between polls in milliseconds (default: 500) | |
| deviceId | No | Optional device ID. Uses first available device if not specified. |