ui_wait
Polls Android UI hierarchy until a target element appears or disappears, replacing fixed sleeps with criteria and timeout.
Instructions
Wait until an element appears (or disappears) instead of guessing with sleeps. Polls the hierarchy until the criteria match or timeout elapses.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ui_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Substring of text (case-insensitive) | |
| timeout | No | Seconds to wait (default 10) | |
| interval | No | Poll interval in seconds (default 0.5) | |
| clickable | No | Only clickable (true) / non-clickable (false) | |
| disappear | No | Wait for the element to go away instead | |
| class_name | No | Substring of class | |
| resource_id | No | Substring of resource-id | |
| content_desc | No | Substring of content-desc |