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
Base class for boolean toggle components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck()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.booleanIs this toggle component AJAX enabled?booleanvoidsetValue(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, selectAllTextMethods inherited from class org.primefaces.selenium.component.base.AbstractComponent
destroy, getWidgetByIdScript, getWidgetConfiguration, getWidgetConfigurationAsString, isAjaxified, isAjaxifiedMethods inherited from class org.primefaces.selenium.AbstractPrimePageFragment
getElementLocator, getId, getRoot, getWebDriver, getWrappedElement, setElementLocator, setWebDriverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.TakesScreenshot
getScreenshotAsMethods inherited from interface org.openqa.selenium.WebElement
findElement, findElements, getAccessibleName, getAriaRole, getAttribute, getCssValue, getDomAttribute, getDomProperty, getLocation, getRect, getShadowRoot, getSize, getTagName, getText, isDisplayed, sendKeys, submit
-
Constructor Details
-
AbstractToggleComponent
public AbstractToggleComponent()
-
-
Method Details
-
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.
-