Class ThucydidesFluentWait<T>

java.lang.Object
net.thucydides.core.scheduling.ThucydidesFluentWait<T>
All Implemented Interfaces:
org.openqa.selenium.support.ui.Wait<T>
Direct Known Subclasses:
FluentWaitWithRefresh, NormalFluentWait

public abstract class ThucydidesFluentWait<T>
extends java.lang.Object
implements org.openqa.selenium.support.ui.Wait<T>
  • Field Details

    • timeout

      protected java.time.Duration timeout
    • interval

      protected java.time.Duration interval
  • Constructor Details

    • ThucydidesFluentWait

      public ThucydidesFluentWait​(T input, java.time.Clock clock, org.openqa.selenium.support.ui.Sleeper sleeper)
  • Method Details

    • getClock

      protected java.time.Clock getClock()
    • getInput

      protected T getInput()
    • getSleeper

      protected org.openqa.selenium.support.ui.Sleeper getSleeper()
    • until

      public <V> V until​(java.util.function.Function<? super T,​V> isTrue)
      Specified by:
      until in interface org.openqa.selenium.support.ui.Wait<T>
    • doWait

      public abstract void doWait() throws java.lang.InterruptedException
      Throws:
      java.lang.InterruptedException
    • ignoring

      public ThucydidesFluentWait<T> ignoring​(java.lang.Class<? extends java.lang.RuntimeException>... types)
    • withTimeout

      public ThucydidesFluentWait<T> withTimeout​(long duration, java.util.concurrent.TimeUnit unit)
    • withTimeout

      public ThucydidesFluentWait<T> withTimeout​(java.time.Duration timeout)
    • withMessage

      public ThucydidesFluentWait<T> withMessage​(java.lang.String message)
      Sets the message to be displayed when time expires.
      Parameters:
      message - to be appended to default.
      Returns:
      A self reference.
    • withMessage

      public ThucydidesFluentWait<T> withMessage​(java.util.function.Supplier<java.lang.String> messageSupplier)
      Sets the message to be evaluated and displayed when time expires.
      Parameters:
      messageSupplier - to be evaluated on failure and appended to default.
      Returns:
      A self reference.
    • pollingEvery

      public ThucydidesFluentWait<T> pollingEvery​(long duration, java.util.concurrent.TimeUnit unit)
    • timeoutException

      protected java.lang.RuntimeException timeoutException​(java.lang.String message, java.lang.RuntimeException lastException)
    • withTimeoutOf

      public TimeoutSchedule withTimeoutOf​(int amount)
    • pollingEvery

      public PollingSchedule pollingEvery​(int amount)