wait_for
Block until text or element appears (or disappears with state 'gone') in mobile UI. Returns elapsed time and semantic diff; on timeout returns current UI tree without throwing.
Instructions
BLOCK until text or an element appears (or disappears with state:'gone') — use this instead of screenshot+sleep loops. Returns immediately when the condition is met, with elapsed time and a semantic diff of what changed. On timeout it returns matched:false plus the current UI tree (never throws) so you can see what IS on screen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Substring to wait for anywhere on screen | |
| state | No | Default 'visible' | |
| device | No | Device id from list_devices. Optional when exactly one device is booted. | |
| selector | No | ||
| timeoutMs | No | Default 15000, max 120000 |