Interface Wait<F>

Type Parameters:
F - the argument to pass to any function called
All Known Implementing Classes:
FluentWait, WebDriverWait

public interface Wait<F>
A generic interface for waiting until a condition is true or not null. The condition may take a single argument of type .
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    until(Function<? super F,T> isTrue)
    Implementations should wait until the condition evaluates to a value that is neither null nor false.
  • Method Details

    • until

      <T> T until(Function<? super F,T> isTrue)
      Implementations should wait until the condition evaluates to a value that is neither null nor false. Because of this contract, the return type must not be Void.

      If the condition does not become true within a certain time (as defined by the implementing class), this method will throw a non-specified Throwable. This is so that an implementor may throw whatever is idiomatic for a given test infrastructure (e.g. JUnit4 would throw AssertionError).

      Type Parameters:
      T - the return type of the method, which must not be Void
      Parameters:
      isTrue - the parameter to pass to the ExpectedCondition
      Returns:
      truthy value from the isTrue condition