Skip to content

ToggleButton

flaui.core.automation_elements.ToggleButton

Bases: AutomationElement

Class to interact with a toggle button element.

toggle()

Toggles the toggle button. Note: In some WPF scenarios, the bounded command might not be fired. Use AutomationElement.Click instead in that case.

Source code in flaui/core/automation_elements.py
@handle_csharp_exceptions
def toggle(self):
    """Toggles the toggle button.
    **Note**: In some WPF scenarios, the bounded command might not be fired. Use AutomationElement.Click instead in that case.
    """
    self.raw_element.Toggle()