Ui Wait For Element
ui_wait_for_elementDeterministic synchronization — replaces all sleeps. Polls for an element until it reaches state (present|enabled|focused|absent) or times out. A timeout is an EXPLICIT error, never a false success. Returns {satisfied, waited_ms, element_ref?, bounds?, enabled_unknown?}. state:'enabled' is satisfied unless the app publishes AXEnabled=false; if the app publishes no AXEnabled at all the result carries enabled_unknown:true — the wait did not block, but nothing was actually verified about enabled-ness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Accessibility role of the element (e.g. AXButton, AXTextField). | |
| label | No | Visible label or title of the element. | |
| match | No | How to compare label: "exact" (default) or "contains". | |
| state | No | Default present. | |
| poll_ms | No | Default 150. | |
| window_id | No | Window to look in, from list_windows. Narrows the search to one window. | |
| timeout_ms | No | Default 5000. | |
| app_bundle_id | No | Bundle id of the app to look in (e.g. com.apple.Safari). Narrows the search and makes it faster. |