public class RadioButtonGroup extends GroupComponent<RadioButton>
@ElementAccessor(elementName="marital status", byName = "radio_4")
private RadioButtonGroup maritalStatus;
Example usage binding by xpath:
@ElementAccessor(elementName="marital status", byXPath = "/select[@type='radio' and @name='radio_4']")
private RadioButtonGroup maritalStatus;
webElement| Constructor and Description |
|---|
RadioButtonGroup() |
| Modifier and Type | Method and Description |
|---|---|
int |
getSelectedIndex()
Gets the selected index from the Radio Button Group
|
String |
getSelectedValue()
Gets the selected value from the Radio Button Group, by finding the selected radio button and
retrieving the value attribute from it.
|
List<String> |
getValues()
Gets all values from Radio Buttons in group.
|
void |
selectByIndex(int index)
Selects a Radio Button by index.
|
void |
selectByValue(String value)
Selects a Radio Button by value.
|
findElement, get, getAll, setItemType, sizefind, findAll, findElements, getBrowser, getHtmlElement, getLocator, getLogger, getName, getParent, isAlive, setBrowser, setLocator, setName, setParent, setWebElement, toStringpublic List<String> getValues()
public void selectByValue(String value)
value - - value to be selectedNoSuchElementException - - if value is not present in grouppublic void selectByIndex(int index)
index - - zero based index to be selectedIndexOutOfBoundsException - - if index is outside the bounds of the grouppublic String getSelectedValue()
public int getSelectedIndex()
Copyright © 2018. All rights reserved.