Package net.thucydides.core.scheduling
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 Summary
-
Constructor Summary
Constructors Constructor Description ThucydidesFluentWait(T input, java.time.Clock clock, org.openqa.selenium.support.ui.Sleeper sleeper) -
Method Summary
Modifier and Type Method Description abstract voiddoWait()protected java.time.ClockgetClock()protected TgetInput()protected org.openqa.selenium.support.ui.SleepergetSleeper()ThucydidesFluentWait<T>ignoring(java.lang.Class<? extends java.lang.RuntimeException>... types)PollingSchedulepollingEvery(int amount)ThucydidesFluentWait<T>pollingEvery(long duration, java.util.concurrent.TimeUnit unit)protected java.lang.RuntimeExceptiontimeoutException(java.lang.String message, java.lang.RuntimeException lastException)<V> Vuntil(java.util.function.Function<? super T,V> isTrue)ThucydidesFluentWait<T>withMessage(java.lang.String message)Sets the message to be displayed when time expires.ThucydidesFluentWait<T>withMessage(java.util.function.Supplier<java.lang.String> messageSupplier)Sets the message to be evaluated and displayed when time expires.ThucydidesFluentWait<T>withTimeout(long duration, java.util.concurrent.TimeUnit unit)ThucydidesFluentWait<T>withTimeout(java.time.Duration timeout)TimeoutSchedulewithTimeoutOf(int amount)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
getSleeper
protected org.openqa.selenium.support.ui.Sleeper getSleeper() -
until
- Specified by:
untilin interfaceorg.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
-
withTimeout
-
withMessage
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
-
timeoutException
protected java.lang.RuntimeException timeoutException(java.lang.String message, java.lang.RuntimeException lastException) -
withTimeoutOf
-
pollingEvery
-