Wait for
wait_forPoll the screen until a UI element becomes visible or disappears, or timeout. Replaces fixed sleeps with efficient polling to wait only as long as needed.
Instructions
Poll the screen until an element becomes visible or not_visible, or timeout. Replaces fixed sleeps — fast when ready, patient when not.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device_id": "<device_id>"
},
"name": "wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| text | No | ||
| index | No | ||
| condition | No | visible | |
| device_id | Yes | Device id from list_devices (adb serial like 'emulator-5554', or an iOS simulator UDID) | |
| timeout_ms | No | ||
| interval_ms | No | ||
| resource_id | No | ||
| accessibility | No |