public class WebDriverWait extends FluentWait<org.openqa.selenium.WebDriver>
FluentWait
that uses WebDriver instances.DEFAULT_SLEEP_TIMEOUT, FIVE_HUNDRED_MILLIS
Constructor and Description |
---|
WebDriverWait(org.openqa.selenium.WebDriver driver,
Clock clock,
Sleeper sleeper,
long timeOutInSeconds,
long sleepTimeOut) |
WebDriverWait(org.openqa.selenium.WebDriver driver,
long timeOutInSeconds)
Wait will ignore instances of NotFoundException that are encountered (thrown) by default in
the 'until' condition, and immediately propagate all others.
|
WebDriverWait(org.openqa.selenium.WebDriver driver,
long timeOutInSeconds,
long sleepInMillis)
Wait will ignore instances of NotFoundException that are encountered (thrown) by default in
the 'until' condition, and immediately propagate all others.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.RuntimeException |
timeoutException(java.lang.String message,
java.lang.Throwable lastException)
Throws a timeout exception.
|
ignoreAll, ignoring, ignoring, pollingEvery, pollingEvery, until, withMessage, withMessage, withTimeout, withTimeout
public WebDriverWait(org.openqa.selenium.WebDriver driver, long timeOutInSeconds)
driver
- The WebDriver instance to pass to the expected conditionstimeOutInSeconds
- The timeout in seconds when an expectation is calledFluentWait.ignoring(java.lang.Class)
public WebDriverWait(org.openqa.selenium.WebDriver driver, long timeOutInSeconds, long sleepInMillis)
driver
- The WebDriver instance to pass to the expected conditionstimeOutInSeconds
- The timeout in seconds when an expectation is calledsleepInMillis
- The duration in milliseconds to sleep between polls.FluentWait.ignoring(java.lang.Class)
public WebDriverWait(org.openqa.selenium.WebDriver driver, Clock clock, Sleeper sleeper, long timeOutInSeconds, long sleepTimeOut)
driver
- The WebDriver instance to pass to the expected conditionsclock
- The clock to use when measuring the timeoutsleeper
- Object used to make the current thread go to sleep.timeOutInSeconds
- The timeout in seconds when an expectation issleepTimeOut
- The timeout used whilst sleeping. Defaults to 500ms called.protected java.lang.RuntimeException timeoutException(java.lang.String message, java.lang.Throwable lastException)
FluentWait
timeoutException
in class FluentWait<org.openqa.selenium.WebDriver>
message
- The timeout message.lastException
- The last exception to be thrown and subsequently suppressed while waiting
on a function.