wpf_set_text
Set the text of WPF UI elements like TextBox or ComboBox using UI Automation or keyboard simulation. Handles different input methods automatically or on demand.
Instructions
Set the text/value of a UI element (TextBox, ComboBox, etc.). By default uses UI Automation IValueProvider.SetValue (clean, no focus needed, raises proper events). Falls back to setting TextBox.Text or PasswordBox.Password directly, or a reflected string 'Text' property. Set physical=true to focus the element and type via OS keyboard input (clears existing text with Ctrl+A/Delete first, then types each character; moves window focus). STATE-CHANGING.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| physical | No | ||
| element_handle | Yes |