Class AbstractToggleComponent

All Implemented Interfaces:
org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement
Direct Known Subclasses:
InputSwitch, SelectBooleanButton, SelectBooleanCheckbox, ToggleSwitch

public abstract class AbstractToggleComponent extends AbstractInputComponent
Base class for boolean toggle components.
  • Constructor Details

    • AbstractToggleComponent

      public AbstractToggleComponent()
  • Method Details

    • getInput

      public org.openqa.selenium.WebElement getInput()
      Description copied from class: AbstractInputComponent
      The input element reference.
      Overrides:
      getInput in class AbstractInputComponent
      Returns:
      the WebElement representing the input.
    • isSelected

      public boolean isSelected()
    • click

      public void click()
    • isOnChangeAjaxified

      public boolean isOnChangeAjaxified()
      Is this toggle component AJAX enabled?
      Returns:
      true if AJAX enabled false if not
    • setValue

      public void setValue(boolean value)
      Set the value of the the toggle component.
      Parameters:
      value - true for checked, false for unchecked
    • getValue

      public boolean getValue()
      Gets the value of the toggle component.
      Returns:
      true for checked, false for unchecked
    • toggle

      public void toggle()
      Turns this switch in case it is off, or turns of off in case it is on.
    • check

      public void check()
      Turns this switch on if it is not already turned on.
    • uncheck

      public void uncheck()
      Turns this switch off if it is not already turned of.