ui_toggle
Toggle UI checkboxes and toggle buttons via UIA TogglePattern, returning the new state (On, Off, Indeterminate) for reliable feedback.
Instructions
Toggle a CheckBox or ToggleButton using UIA TogglePattern.
Returns the new toggle state after the operation: "On", "Off", or "Indeterminate". Use this instead of ui_click for checkboxes to get reliable state feedback.
Note: If app is STOPPED at breakpoint, resume with continue_execution() first.
Args: automation_id: AutomationId property name: Element's Name/Title property control_type: Control type (CheckBox, ToggleButton, etc.) root_id: Optional AutomationId to scope search to a subtree xpath: Optional XPath expression (FlaUI backend only)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automation_id | No | ||
| name | No | ||
| control_type | No | ||
| root_id | No | ||
| xpath | No |