ui_toggle
Toggles a CheckBox or ToggleButton using UIA TogglePattern and returns the new state: On, Off, or Indeterminate.
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 |
|---|---|---|---|
| name | No | ||
| xpath | No | ||
| root_id | No | ||
| control_type | No | ||
| automation_id | No |