set_element_value
Programmatically set text field or combo box values via UIA ValuePattern for reliable form input. Use narrate:'rich' to confirm application without screenshots or lensId for safety guards and perception feedback.
Instructions
Set the value of a text field or combo box via UIA ValuePattern — more reliable than keyboard_type for programmatic form input. Use narrate:'rich' to confirm the value was applied without a verification screenshot. Pass lensId (from perception_register) to run safety guards (identity stable, foreground, modal) before setting and receive post.perception state feedback without a screenshot. Caveats: Only works for elements that expose ValuePattern; does not work on contenteditable HTML or custom rich-text editors — use keyboard_type for those.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| windowTitle | Yes | Partial window title | |
| value | Yes | The value to set | |
| name | No | Element name/label (partial match) | |
| automationId | No | Exact AutomationId of the element | |
| narrate | No | Narration level. rich includes UIA or browser state diff when supported. | minimal |
| lensId | No | Optional perception lens ID. Guards (safe.keyboardTarget, target.identityStable) are evaluated before setting, and a perception envelope is attached to post.perception on success. |