Package de.bmiag.tapir.htmlbasic.impl
Class DefaultSeleniumRadioButtonGroup
- java.lang.Object
-
- de.bmiag.tapir.selenium.element.AbstractMultiSeleniumElement
-
- de.bmiag.tapir.htmlbasic.impl.DefaultSeleniumRadioButtonGroup
-
- All Implemented Interfaces:
RadioButtonGroup
,MultiWebElementBased
,Displayable
,ElementCollection<RadioButton>
,SingleSelectable<RadioButton>
,TapirElement
@Component("tapirRadioButtonGroup") @Scope("prototype") public class DefaultSeleniumRadioButtonGroup extends AbstractMultiSeleniumElement implements RadioButtonGroup
Default Selenium implementation of aRadioButtonGroup
.
The implementation how to interpret the Radio buttons is delegated toRadioButton
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description DefaultSeleniumRadioButtonGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<RadioButton>
findElements(java.util.function.Predicate<? super RadioButton> predicate)
Returns all elements which match the given predicatejava.util.List<RadioButton>
findElementsByLabel(java.lang.String aLabel)
Returns all elements which have the given label.RadioButton
findFirstElement(java.util.function.Predicate<? super RadioButton> predicate)
Returns the first element which matches the given predicateRadioButton
findFirstElementByLabel(java.lang.String aLabel)
Returns the first element which has the given labeljava.util.List<RadioButton>
getElements()
Returns all elementsprotected java.util.List<RadioButton>
getElementsInternal(java.util.function.Predicate<? super RadioButton> predicate, boolean returnOnFirstMatch)
RadioButton
getSelectedElement()
Returns the selected element.boolean
isDisplayed()
Returns true, if the element is displayed.-
Methods inherited from class de.bmiag.tapir.selenium.element.AbstractMultiSeleniumElement
getWebElements, setWebElements
-
-
-
-
Method Detail
-
getElementsInternal
protected java.util.List<RadioButton> getElementsInternal(java.util.function.Predicate<? super RadioButton> predicate, boolean returnOnFirstMatch)
-
getElements
public java.util.List<RadioButton> getElements()
Description copied from interface:ElementCollection
Returns all elements- Specified by:
getElements
in interfaceElementCollection<RadioButton>
- Returns:
- all elements
-
isDisplayed
public boolean isDisplayed()
Description copied from interface:Displayable
Returns true, if the element is displayed. "Displayed" means it has to be part of the dom and it is not hidden using css.- Specified by:
isDisplayed
in interfaceDisplayable
- Returns:
- true, if the element is displayed.
-
getSelectedElement
public RadioButton getSelectedElement()
Description copied from interface:SingleSelectable
Returns the selected element.- Specified by:
getSelectedElement
in interfaceSingleSelectable<RadioButton>
- Returns:
- the label of the selected value
-
findElements
public java.util.List<RadioButton> findElements(java.util.function.Predicate<? super RadioButton> predicate)
Description copied from interface:ElementCollection
Returns all elements which match the given predicate- Specified by:
findElements
in interfaceElementCollection<RadioButton>
- Parameters:
predicate
- the predicate for finding the elements- Returns:
- all elements which match the given predicate
-
findFirstElement
public RadioButton findFirstElement(java.util.function.Predicate<? super RadioButton> predicate)
Description copied from interface:ElementCollection
Returns the first element which matches the given predicate- Specified by:
findFirstElement
in interfaceElementCollection<RadioButton>
- Parameters:
predicate
- the predicate for selecting the element- Returns:
- all elements which match the given predicate, cannot be null
-
findElementsByLabel
public java.util.List<RadioButton> findElementsByLabel(java.lang.String aLabel)
Description copied from interface:RadioButtonGroup
Returns all elements which have the given label.- Specified by:
findElementsByLabel
in interfaceRadioButtonGroup
- Parameters:
aLabel
- the label for finding the elements- Returns:
- all elements which have the given label.
-
findFirstElementByLabel
public RadioButton findFirstElementByLabel(java.lang.String aLabel)
Description copied from interface:RadioButtonGroup
Returns the first element which has the given label- Specified by:
findFirstElementByLabel
in interfaceRadioButtonGroup
- Parameters:
aLabel
- the label for selecting the element- Returns:
- all elements which have the given label, cannot be null
-
-