Wait for Element to Appear [Pro]
wait_for_elementWaits for a specific UI element to appear on screen by polling the UI tree. Use after navigation to wait for a button, text, or field, returning as soon as the target element is found.
Instructions
[Pro] Waits for a specific UI element to appear on screen by polling the UI tree. More reliable and faster than wait_for_settle — returns as soon as the target element is found. Use after navigation to wait for a specific button, text, or field to appear. Example: wait_for_element('Find Routes') after selecting a station.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | Device serial ID | |
| query | Yes | Description of the element to wait for, e.g. 'Find Routes button' or 'search results' | |
| timeout | No | Maximum time to wait in milliseconds (default: 5000) | |
| poll_interval | No | Time between polls in milliseconds (default: 300) |