public abstract class ThucydidesFluentWait<T> extends Object implements org.openqa.selenium.support.ui.Wait<T>
Modifier and Type | Field and Description |
---|---|
protected Duration |
interval |
protected Duration |
timeout |
Constructor and Description |
---|
ThucydidesFluentWait(T input,
Clock clock,
org.openqa.selenium.support.ui.Sleeper sleeper) |
Modifier and Type | Method and 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(Duration timeout) |
ThucydidesFluentWait<T> |
withTimeout(long duration,
TimeUnit unit) |
TimeoutSchedule |
withTimeoutOf(int amount) |
protected Clock getClock()
protected T getInput()
protected org.openqa.selenium.support.ui.Sleeper getSleeper()
public <V> V until(Function<? super T,V> isTrue)
until
in interface org.openqa.selenium.support.ui.Wait<T>
public abstract void doWait() throws InterruptedException
InterruptedException
public ThucydidesFluentWait<T> ignoring(Class<? extends RuntimeException>... types)
public ThucydidesFluentWait<T> withTimeout(long duration, TimeUnit unit)
public ThucydidesFluentWait<T> withTimeout(Duration timeout)
public ThucydidesFluentWait<T> withMessage(String message)
message
- to be appended to default.public ThucydidesFluentWait<T> withMessage(Supplier<String> messageSupplier)
messageSupplier
- to be evaluated on failure and appended to default.public ThucydidesFluentWait<T> pollingEvery(long duration, TimeUnit unit)
protected RuntimeException timeoutException(String message, RuntimeException lastException)
public TimeoutSchedule withTimeoutOf(int amount)
public PollingSchedule pollingEvery(int amount)
Copyright © 2023. All rights reserved.