Class ToggleButton

  • All Implemented Interfaces:
    org.openqa.selenium.interactions.Locatable, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsDriver
    Direct Known Subclasses:
    CheckBox

    public class ToggleButton
    extends DesktopElement
    • Constructor Detail

      • ToggleButton

        public ToggleButton​(org.openqa.selenium.WebElement element)
    • Method Detail

      • toggle

        public void toggle()
        Toggles the toggle button. Note: In some WPF scenarios, the bounded command might not be fired. Use "AutomationElement.Click" instead in that case.
      • getToggleState

        public ToggleState getToggleState()
        Gets the current toggle state.
        Returns:
      • setToggleState

        public void setToggleState​(ToggleState toggleState)
        Sets the current toggle state.