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 Object implements org.openqa.selenium.support.ui.Wait<T>
-
-
Constructor Summary
Constructors Constructor Description ThucydidesFluentWait(T input, Clock clock, org.openqa.selenium.support.ui.Sleeper sleeper)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
doWait()
protected Clock
getClock()
protected T
getInput()
protected org.openqa.selenium.support.ui.Sleeper
getSleeper()
ThucydidesFluentWait<T>
ignoring(Class<? extends RuntimeException>... types)
PollingSchedule
pollingEvery(int amount)
ThucydidesFluentWait<T>
pollingEvery(long duration, TimeUnit unit)
protected RuntimeException
timeoutException(String message, RuntimeException lastException)
<V> V
until(Function<? super T,V> isTrue)
ThucydidesFluentWait<T>
withMessage(String message)
Sets the message to be displayed when time expires.ThucydidesFluentWait<T>
withMessage(Supplier<String> messageSupplier)
Sets the message to be evaluated and displayed when time expires.ThucydidesFluentWait<T>
withTimeout(long duration, TimeUnit unit)
ThucydidesFluentWait<T>
withTimeout(Duration timeout)
TimeoutSchedule
withTimeoutOf(int amount)
-
-
-
Method Detail
-
getClock
protected Clock getClock()
-
getInput
protected T getInput()
-
getSleeper
protected org.openqa.selenium.support.ui.Sleeper getSleeper()
-
until
public <V> V until(Function<? super T,V> isTrue)
- Specified by:
until
in interfaceorg.openqa.selenium.support.ui.Wait<T>
-
doWait
public abstract void doWait() throws InterruptedException
- Throws:
InterruptedException
-
ignoring
public ThucydidesFluentWait<T> ignoring(Class<? extends RuntimeException>... types)
-
withTimeout
public ThucydidesFluentWait<T> withTimeout(long duration, TimeUnit unit)
-
withTimeout
public ThucydidesFluentWait<T> withTimeout(Duration timeout)
-
withMessage
public ThucydidesFluentWait<T> withMessage(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(Supplier<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, TimeUnit unit)
-
timeoutException
protected RuntimeException timeoutException(String message, RuntimeException lastException)
-
withTimeoutOf
public TimeoutSchedule withTimeoutOf(int amount)
-
pollingEvery
public PollingSchedule pollingEvery(int amount)
-
-