glass_click_element
Click any UI element by its snapshot ID, using native accessibility actions when available and falling back to pointer clicks for occluded or off-screen targets.
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). If at least two next actions or waits are known, use glass_do instead of separate calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Element `#id` from the latest `glass_a11y_snapshot`. Re-snapshot after UI changes. Popover-owned targets route to their window and restore the prior active window. The role-appropriate native accessibility operation handles occluded or off-screen targets and separate labels through their enclosing control. Unavailable native operations fall back to a pointer click at the target center. Text editors may receive focus without activation. `method:"native-action"` labels any native path. `native_fallback` explains pointer fallback. `actuated_id` identifies a substituted enclosing control. | |
| return | No | Terminal observation: "snapshot" settles and refreshes/folds a11y, "settle" waits for visual stability and returns text-only metadata, and "none" skips observation (default). |