public class Radio extends TypifiedElement
| Constructor and Description |
|---|
Radio(org.openqa.selenium.WebElement wrappedElement)
Specifies a radio button of a radio button group that will be used to
find all other buttons of this group.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.openqa.selenium.WebElement> |
getButtons()
Returns all radio buttons belonging to this group.
|
org.openqa.selenium.WebElement |
getSelectedButton()
Returns selected radio button.
|
boolean |
hasSelectedButton()
Indicates if radio group has selected button.
|
void |
selectByIndex(int index)
Selects a radio button by the given index.
|
void |
selectByValue(String value)
Selects first radio button that has a value matching the specified argument.
|
clear, click, exists, findElement, findElements, getAttribute, getCssValue, getLocation, getName, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, isDisplayed, isEnabled, isSelected, sendKeys, setName, submit, toStringpublic Radio(org.openqa.selenium.WebElement wrappedElement)
wrappedElement - WebElement representing radio button.public List<org.openqa.selenium.WebElement> getButtons()
WebElements representing radio buttons.public org.openqa.selenium.WebElement getSelectedButton()
WebElement representing selected radio button or
null if no radio buttons are selected.public boolean hasSelectedButton()
true if radio has selected button and false
otherwise.public void selectByValue(String value)
value - The value to match against.public void selectByIndex(int index)
index - Index of a radio button to be selected.Copyright © 2023 Yandex. All rights reserved.