Class RadioInputs
- java.lang.Object
-
- com.github.loyada.jdollarx.singlebrowser.highlevelapi.RadioInputs
-
public final class RadioInputs extends Object
High-level API to define a with high level instance of radio input High level API's are not optimized. A definition of an element may interact with the browser to understand the structure of the DOM.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RadioInput
withLabeledText(String labelText)
create and return a RadioInput, that has a "label" element with the given text.static RadioInput
withProperties(ElementProperty... props)
return a radio button with some custom propertiesstatic RadioInput
withTextUnknownDOM(String text, int originalImplicitWait, TimeUnit timeUnit)
In case the organization of the DOM is unclear, it will try both labeled input and unlabeled input.static RadioInput
withUnlabeledText(String text)
create and return a RadioInput, that has straight text after it (not in a "label" element).
-
-
-
Method Detail
-
withTextUnknownDOM
public static RadioInput withTextUnknownDOM(String text, int originalImplicitWait, TimeUnit timeUnit)
In case the organization of the DOM is unclear, it will try both labeled input and unlabeled input. When doing so, it will change the implicit wait temporarily to a small value, and then revert the implicit timeout to the values provided. Use this only if you are not sure about the structure of the DOM.- Parameters:
text
- - the text following the radio buttonoriginalImplicitWait
- - the current implicit waittimeUnit
- - the current time unit of the implicit wait- Returns:
- a RadioInput instance
-
withLabeledText
public static RadioInput withLabeledText(String labelText)
create and return a RadioInput, that has a "label" element with the given text. Note that this is not a pure declaration and it looks for the label in the browser.- Parameters:
labelText
- - the text in the label- Returns:
- - a RadioInput instance
-
withUnlabeledText
public static RadioInput withUnlabeledText(String text)
create and return a RadioInput, that has straight text after it (not in a "label" element). i.e.:Male
Female
- Parameters:
text
- - the text following the radio button- Returns:
- - a RadioInput instance
-
withProperties
public static RadioInput withProperties(ElementProperty... props)
return a radio button with some custom properties- Parameters:
props
- - some custom properties for the radio button- Returns:
- a radio input with some custom properties
-
-