wait_for
Poll the Android screen until a specified text, description, or ID appears or disappears. Handles loading states and returns a status without throwing timeout errors.
Instructions
Block until a semantic target appears or disappears on screen.
Polls fresh snapshots every interval seconds until the condition
holds or timeout expires (handles loading screens and transient UI).
Never raises on timeout — returns satisfied: false + final hash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | "present" (default) waits until it appears; "absent" until it disappears. | present |
| device | No | ADB serial; omit with a single connected device. | |
| target | Yes | {"by": "text"|"desc"|"id", "value": str} — the element to wait for. | |
| timeout | No | max seconds to wait (default 10). | |
| interval | No | seconds between polls (default 0.5). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||