Interface Wait<F>

  • Type Parameters:
    F - the argument to pass to any function called
    All Known Implementing Classes:
    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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T until​(com.google.common.base.Function<F,​T> isTrue)
      Implementations should wait until the condition evaluates to a value that is neither null nor false.
    • Method Detail

      • until

        <T> T until​(com.google.common.base.Function<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