public class CheckBox extends TypifiedElement
| Constructor and Description |
|---|
CheckBox(org.openqa.selenium.WebElement wrappedElement)
Specifies wrapped
WebElement. |
| Modifier and Type | Method and Description |
|---|---|
void |
deselect()
Deselects checkbox if it is not already deselected.
|
org.openqa.selenium.WebElement |
getLabel()
Finds label corresponding to this checkbox using "following-sibling::label" xpath.
|
String |
getLabelText()
Finds a text of the checkbox label.
|
String |
getText()
The same as
getLabelText(). |
void |
select()
Selects checkbox if it is not already selected.
|
void |
set(boolean value)
Selects checkbox if passed value is
true and deselects otherwise. |
clear, click, exists, findElement, findElements, getAttribute, getCssValue, getLocation, getName, getRect, getScreenshotAs, getSize, getTagName, getWrappedElement, isDisplayed, isEnabled, isSelected, sendKeys, setName, submit, toStringpublic CheckBox(org.openqa.selenium.WebElement wrappedElement)
WebElement.wrappedElement - WebElement to wrap.public org.openqa.selenium.WebElement getLabel()
WebElement representing label or null if no label has been found.public String getLabelText()
null if no label has been found.public String getText()
getLabelText().getText in interface org.openqa.selenium.WebElementgetText in class TypifiedElementnull if no label has been found.public void select()
public void deselect()
public void set(boolean value)
true and deselects otherwise.Copyright © 2023 Yandex. All rights reserved.