Package de.bmiag.tapir.htmlbasic.impl
Class DefaultSeleniumCheckboxGroup
- java.lang.Object
-
- de.bmiag.tapir.selenium.element.AbstractMultiSeleniumElement
-
- de.bmiag.tapir.htmlbasic.impl.DefaultSeleniumCheckboxGroup
-
- All Implemented Interfaces:
CheckboxGroup
,MultiWebElementBased
,Displayable
,ElementCollection<Checkbox>
,MultiSelectable<Checkbox>
,TapirElement
@Component("tapirCheckboxGroup") @Scope("prototype") public class DefaultSeleniumCheckboxGroup extends AbstractMultiSeleniumElement implements CheckboxGroup
Default Selenium implementation of aCheckboxGroup
.
The implementation how to interpret the checkboxes is delegated toCheckbox
.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description DefaultSeleniumCheckboxGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Checkbox>
findElements(java.util.function.Predicate<? super Checkbox> predicate)
Returns all elements which match the given predicatejava.util.List<Checkbox>
findElementsByLabel(java.lang.String aLabel)
Returns all elements which have the given label.Checkbox
findFirstElement(java.util.function.Predicate<? super Checkbox> predicate)
Returns the first element which matches the given predicateCheckbox
findFirstElementByLabel(java.lang.String aLabel)
Returns the first element which has the given labeljava.util.List<Checkbox>
getElements()
Returns all elementsprotected java.util.List<Checkbox>
getElementsInternal(java.util.function.Predicate<? super Checkbox> predicate, boolean returnOnFirstMatch)
java.util.List<Checkbox>
getSelectedElements()
Returns the selected elements.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<Checkbox> getElementsInternal(java.util.function.Predicate<? super Checkbox> predicate, boolean returnOnFirstMatch)
-
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.
-
getElements
public java.util.List<Checkbox> getElements()
Description copied from interface:ElementCollection
Returns all elements- Specified by:
getElements
in interfaceElementCollection<Checkbox>
- Returns:
- all elements
-
getSelectedElements
public java.util.List<Checkbox> getSelectedElements()
Description copied from interface:MultiSelectable
Returns the selected elements.- Specified by:
getSelectedElements
in interfaceMultiSelectable<Checkbox>
- Returns:
- the selected elements
-
findElements
public java.util.List<Checkbox> findElements(java.util.function.Predicate<? super Checkbox> predicate)
Description copied from interface:ElementCollection
Returns all elements which match the given predicate- Specified by:
findElements
in interfaceElementCollection<Checkbox>
- Parameters:
predicate
- the predicate for finding the elements- Returns:
- all elements which match the given predicate
-
findFirstElement
public Checkbox findFirstElement(java.util.function.Predicate<? super Checkbox> predicate)
Description copied from interface:ElementCollection
Returns the first element which matches the given predicate- Specified by:
findFirstElement
in interfaceElementCollection<Checkbox>
- Parameters:
predicate
- the predicate for selecting the element- Returns:
- all elements which match the given predicate, cannot be null
-
findElementsByLabel
public java.util.List<Checkbox> findElementsByLabel(java.lang.String aLabel)
Description copied from interface:CheckboxGroup
Returns all elements which have the given label.- Specified by:
findElementsByLabel
in interfaceCheckboxGroup
- Parameters:
aLabel
- the label for finding the elements- Returns:
- all elements which have the given label.
-
findFirstElementByLabel
public Checkbox findFirstElementByLabel(java.lang.String aLabel)
Description copied from interface:CheckboxGroup
Returns the first element which has the given label- Specified by:
findFirstElementByLabel
in interfaceCheckboxGroup
- Parameters:
aLabel
- the label for selecting the element- Returns:
- all elements which have the given label, cannot be null
-
-