Package io.fluentlenium.core.conditions
Class AtLeastOneElementConditions
java.lang.Object
io.fluentlenium.core.conditions.AbstractFluentListConditions
io.fluentlenium.core.conditions.AtLeastOneElementConditions
- All Implemented Interfaces:
Conditions<FluentWebElement>,FluentConditions,FluentListConditions,ListConditionsElements
Conditions for list of elements, matching when at least one element of the list matches.
-
Constructor Summary
ConstructorsConstructorDescriptionAtLeastOneElementConditions(List<? extends FluentWebElement> elements) Creates a new condition. -
Method Summary
Modifier and TypeMethodDescriptionprotected Predicate<FluentDriver>buildAtLeastOnePredicate(Predicate<FluentWebElement> predicate, boolean defaultValue) Build predicate for this condition.not()Negates this condition object.booleanverify(Predicate<FluentWebElement> predicate, boolean defaultValue) Check that the given predicate is verified.Methods inherited from class io.fluentlenium.core.conditions.AbstractFluentListConditions
attribute, className, clickable, displayed, enabled, getActualElements, getElements, id, isNegation, name, present, rectangle, selected, setNegation, size, size, stale, tagName, text, textContent, value, verifyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluentlenium.core.conditions.FluentConditions
attribute, id, name, tagName, text, textContent, value
-
Constructor Details
-
AtLeastOneElementConditions
Creates a new condition.- Parameters:
elements- underlying elements
-
-
Method Details
-
not
Description copied from interface:FluentListConditionsNegates this condition object.- Returns:
- a new negated condition object
-
verify
Description copied from interface:FluentListConditionsCheck that the given predicate is verified.- Parameters:
predicate- predicate to checkdefaultValue- default value if input is not present- Returns:
- true if the predicate is verified, false otherwise
-
buildAtLeastOnePredicate
protected Predicate<FluentDriver> buildAtLeastOnePredicate(Predicate<FluentWebElement> predicate, boolean defaultValue) Build predicate for this condition.- Parameters:
predicate- predicatedefaultValue- default value if elements list is empty.- Returns:
- predicate
-