wait_for_element
Polls the UI until an element or text is visible, then proceeds; replaces blind waits with precise readiness detection.
Instructions
Polls until an element/text is visible (via the oracle ladder), or fails on timeout. Use to act the instant the UI is ready instead of a blind sleep.
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": {
"udid": "<udid>"
},
"name": "wait_for_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Simulator UDID | |
| text | No | Visible text to match (native a11y / WebView innerText) | |
| selector | No | CSS selector — WebView surfaces only | |
| bundleId | No | App bundle id for the Maestro fallback (native surface) | |
| contains | No | Substring match for text (default false = exact full-string on native a11y). WebView innerText is always substring. | |
| timeoutMs | No | Wait budget (default 10000) |