glass_wait_for_element
Wait for UI elements to appear, disappear, or change state using accessibility selectors. Returns match status, elapsed time, and element within a configurable timeout.
Instructions
Wait for semantic transition completion, not pixels/stability. Select by name, description and/or role; value is exact, value_contains is a substring. Supports appears/disappears and state conditions. Returns matched, elapsed_ms and the element; timeout is matched:false. Waits for initial tree publication, but errors if no tree appeared. Batched use fails the sequence on an unmatched predicate. For 2+ known steps, use glass_do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Substring of the element's accessible name (selector). | |
| role | No | Element role filter, e.g. "Button", "ProgressBar", "Document" (selector). | |
| value | No | Exact case-sensitive accessible value, requiring another selector and excluding `value_contains`. | |
| condition | No | Default appears. appears|disappears|enabled|disabled|checked|unchecked|selected|unselected|expanded|collapsed|focused|visible|hidden. checked/unchecked require a real checkable state. | |
| timeout_ms | No | Timeout in ms (default 10000). Standalone: matched:false; batched: fails the sequence. | |
| description | No | Accessible-description substring; can select unnamed controls. | |
| interval_ms | No | Poll interval (default 200ms — an a11y snapshot per tick). | |
| value_contains | No | Value substring; requires name, description and/or role; exclusive with value. |