Class AtLeastOneElementConditions

java.lang.Object
io.fluentlenium.core.conditions.AbstractFluentListConditions
io.fluentlenium.core.conditions.AtLeastOneElementConditions
All Implemented Interfaces:
Conditions<FluentWebElement>, FluentConditions, FluentListConditions, ListConditionsElements

public class AtLeastOneElementConditions extends AbstractFluentListConditions
Conditions for list of elements, matching when at least one element of the list matches.
  • Constructor Details

    • AtLeastOneElementConditions

      public AtLeastOneElementConditions (List<? extends FluentWebElement> elements)
      Creates a new condition.
      Parameters:
      elements - underlying elements
  • Method Details

    • not

      Description copied from interface: FluentListConditions
      Negates this condition object.
      Returns:
      a new negated condition object
    • verify

      public boolean verify (Predicate<FluentWebElement> predicate, boolean defaultValue)
      Description copied from interface: FluentListConditions
      Check that the given predicate is verified.
      Parameters:
      predicate - predicate to check
      defaultValue - 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 - predicate
      defaultValue - default value if elements list is empty.
      Returns:
      predicate