Class AbstractToggleComponent
- java.lang.Object
-
- org.primefaces.selenium.AbstractPrimePageFragment
-
- org.primefaces.selenium.component.base.AbstractComponent
-
- org.primefaces.selenium.component.base.AbstractInputComponent
-
- org.primefaces.selenium.component.base.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 Summary
Constructors Constructor Description AbstractToggleComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheck()Turns this switch on if it is not already turned on.voidclick()org.openqa.selenium.WebElementgetInput()The input element reference.booleangetValue()Gets the value of the toggle component.booleanisOnChangeAjaxified()Is this toggle component AJAX enabled?booleanisSelected()voidsetValue(boolean value)Set the value of the the toggle component.voidtoggle()Turns this switch in case it is off, or turns of off in case it is on.voiduncheck()Turns this switch off if it is not already turned of.-
Methods inherited from class org.primefaces.selenium.component.base.AbstractInputComponent
clear, copyToClipboard, disable, enable, getAssignedLabel, getAssignedLabelText, isEnabled, isOnchangeAjaxified, pasteFromClipboard, selectAllText
-
Methods inherited from class org.primefaces.selenium.component.base.AbstractComponent
destroy, getWidgetByIdScript, getWidgetConfiguration, getWidgetConfigurationAsString, isAjaxified, isAjaxified
-
Methods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriver
-
-
-
-
Method Detail
-
getInput
public org.openqa.selenium.WebElement getInput()
Description copied from class:AbstractInputComponentThe input element reference.- Overrides:
getInputin classAbstractInputComponent- Returns:
- the
WebElementrepresenting 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.
-
-