glass_set_value
Set an editable element's value directly using its accessibility ID, bypassing keystrokes. Supports text, numbers, booleans, and dropdown options.
Instructions
Set an editable element's value directly via accessibility (instant, no keystrokes) — pick the element's #id from glass_a11y_snapshot. Errors if the element isn't editable, if it changed since the snapshot (re-snapshot), or if the app exposes no accessibility tree. 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`. | |
| text | Yes | The value to set. For a text field, the text. For a spin/slider, a number. For a switch/checkbox/toggle, a boolean (`"true"`/`"false"`/`"on"`/`"off"`/ `"1"`/`"0"`) — idempotent. For a dropdown/combo box, an option label (case-insensitive); glass opens it and picks that option. | |
| 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). |