public class CheckBox extends InteractiveElement implements ICheckBox
Element.HIGHLIGHT_MODES
Modifier and Type | Field and Description |
---|---|
static String |
CHECK |
static String |
CHECKED |
static String |
UNCHECK |
static String |
UNCHECKED |
Constructor and Description |
---|
CheckBox(org.openqa.selenium.By locator) |
CheckBox(String locator) |
Modifier and Type | Method and Description |
---|---|
void |
check()
Implementing this method would allow for checking the CheckBox widget
|
String |
getValue()
Throw Unsupported Operation exception if getValue() on Interactive element is invoked
|
boolean |
isChecked()
Checks to see if the current checkbox is checked
|
void |
setValue(Object value)
Sets the value of the CheckBox
|
void |
uncheck()
Implementing this method would allow for unchecking the CheckBox widget
|
void |
waitForChecked()
Waits for element at locator to be checked within period of
maxRequestTimeout
|
void |
waitForChecked(long time)
Waits for element at locator to be checked within period of specified
time
|
void |
waitForUnchecked()
Waits for element at locator to be not checked within period of
maxRequestTimeout
|
void |
waitForUnchecked(long time)
Waits for element at locator to be not checked within period of specified
time
|
click, clickAndHold, doubleClick, dragAndDrop, dragAndDropByOffset, getLabel, isEnabled, keyDown, keyUp, mouseMove, mouseMoveOut, mouseOver, releaseClickAndHold, rightClick, sendKeys, type, typeAppend
eval, findElement, fireEvent, focusOn, getAttribute, getByLocator, getChildNodesValuesText, getCssValue, getGUIDriver, getInnerHTML, getLocationX, getLocationY, getLocator, getText, getWebElement, hasText, highlight, highlight, highlight, isAttributePresent, isElementNotPresent, isElementNotPresent, isElementPresent, isElementPresent, isElementPresent, isElementVisible, isElementVisible, isWithinBoundsOfWindow, scrollTo, setGUIDriver, waitForAttribute, waitForAttribute, waitForAttributeEqualTo, waitForAttributeEqualTo, waitForAttributeNotEqualTo, waitForAttributeNotEqualTo, waitForCommand, waitForElementNotPresent, waitForElementNotPresent, waitForElementPresent, waitForElementPresent, waitForEnabled, waitForEnabled, waitForNotAttribute, waitForNotAttribute, waitForNotVisible, waitForNotVisible, waitForText, waitForText, waitForVisible, waitForVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
click, clickAndHold, doubleClick, dragAndDrop, dragAndDropByOffset, isEnabled, keyDown, keyUp, mouseMove, mouseMoveOut, mouseOver, releaseClickAndHold, rightClick, sendKeys, type, typeAppend
getLabel
eval, fireEvent, focusOn, getAttribute, getByLocator, getChildNodesValuesText, getCssValue, getInnerHTML, getLocationX, getLocationY, getLocator, getText, getWebElement, hasText, highlight, highlight, isAttributePresent, isElementNotPresent, isElementNotPresent, isElementPresent, isElementPresent, isElementPresent, isElementVisible, isElementVisible, isWithinBoundsOfWindow, scrollTo, waitForAttribute, waitForAttribute, waitForAttributeEqualTo, waitForAttributeEqualTo, waitForAttributeNotEqualTo, waitForAttributeNotEqualTo, waitForElementNotPresent, waitForElementNotPresent, waitForElementPresent, waitForElementPresent, waitForEnabled, waitForEnabled, waitForNotAttribute, waitForNotAttribute, waitForNotVisible, waitForNotVisible, waitForText, waitForText, waitForVisible, waitForVisible
public static final String UNCHECK
public static final String CHECK
public static final String UNCHECKED
public static final String CHECKED
public CheckBox(String locator)
locator
- XPath, ID, name, CSS Selector, class name, or tag namepublic CheckBox(org.openqa.selenium.By locator)
locator
- XPath, ID, name, CSS Selector, class name, or tag namepublic void setValue(Object value) throws WidgetException
setValue
in interface IEditableElement
value
- - String that can be one of two values: CHECK - sets checkbox
from UNCHECKED to CHECK UNCHECK - sets checkbox from CHECKED
to UNCHECKEDWidgetException
public String getValue() throws WidgetException
InteractiveElement
getValue
in interface IReadableElement
getValue
in class InteractiveElement
WidgetException
public boolean isChecked() throws WidgetException
isChecked
in interface ICheckBox
WidgetException
public void check() throws WidgetException
ICheckBox
check
in interface ICheckBox
WidgetException
public void uncheck() throws WidgetException
ICheckBox
uncheck
in interface ICheckBox
WidgetException
public void waitForChecked() throws WidgetException
waitForChecked
in interface ICheckBox
WidgetException
public void waitForChecked(long time) throws WidgetException
waitForChecked
in interface ICheckBox
time
- MilliseoncdsWidgetTimeoutException
WidgetException
public void waitForUnchecked() throws WidgetException
waitForUnchecked
in interface ICheckBox
WidgetException
public void waitForUnchecked(long time) throws WidgetException
waitForUnchecked
in interface ICheckBox
time
- MilliseoncdsWidgetException
Copyright © 2018. All rights reserved.