glass_click_element
Click a UI element by its snapshot id via native accessibility action, with pointer-click fallback for hidden elements. Handles popover windows automatically.
Instructions
Click an element by its #id from glass_a11y_snapshot (actuates via the platform's native accessibility action when the element exposes one — works even when it's occluded or scrolled off-screen — else falls back to a synthetic pointer click at the center of its bounds; the result's method field says which path ran, native_fallback says why when the pointer path was used, and actuated_id names the element actually clicked when a control's label is a separate element from the control itself). If the element actually renders in a popover owned by a different window than the active one (e.g. an open dropdown's option row), the click is automatically routed into that popover window and the previously-active window is restored afterward. Ids are only valid within the latest snapshot — re-run glass_a11y_snapshot if the UI changed. Optional return: "snapshot" settles the UI then folds a fresh a11y tree into the result (and refreshes the snapshot cache); "settle" waits for the UI to stop changing (text-only); omit or "none" for no observe (default).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The element `#id` from `glass_a11y_snapshot`. Valid only within the latest snapshot — re-snapshot if the UI changed. If the element actually renders in a popover owned by a different window than the active one (e.g. an open dropdown's option row), the click is automatically routed into that popover window and the previously-active window is restored afterward — no extra step needed. Clicks via the platform's native accessibility action when the element exposes one (works even when the element is occluded or scrolled off-screen), falling back to a synthetic pointer click at the element's center; the result's `method` field says which path ran, and `native_fallback` says why when the pointer path was used. Where a control's label is a separate element from the control itself, the native action fires on the enclosing control and the result carries `actuated_id` — the element actually clicked. | |
| return | No | Optional observe folded into the result: "snapshot" (wait for the UI to settle, then fold a fresh a11y tree, also refreshing the snapshot cache), "settle" (wait for the UI to stop changing, text-only), or "none" (default). |