Package io.fluentlenium.core.wait
Interface FluentWaitConfiguration<T>
- Type Parameters:
T
-this
object type to chain method calls
- All Known Implementing Classes:
FluentWait
,FluentWaitElement
,FluentWaitElementList
public interface FluentWaitConfiguration<T>
Configuration API of fluent wait object.
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
atMost
(long duration) Configure wait timeout for this wait object.default T
Configure timeout for this wait object.Configure timeout for this wait object.org.openqa.selenium.support.ui.FluentWait
getWait()
Get the underlying selenium wait objectboolean
Check if a message is defined.ignoreAll
(Collection<Class<? extends Throwable>> types) Add given exceptions to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.ignoring
(Class<? extends RuntimeException> exceptionType) Add given exception to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.ignoring
(Class<? extends RuntimeException> firstType, Class<? extends RuntimeException> secondType) Add given exceptions to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.default T
pollingEvery
(long duration) Configure polling time for this wait object.default T
pollingEvery
(long duration, TimeUnit unit) Configure polling time for this wait object.pollingEvery
(Duration duration) Configure polling time for this wait object.default T
withMessage
(String message) Configures a custom message to be used if the condition fails during the timeout duration.withMessage
(Supplier<String> message) Configures a custom message supplier to be used if the condition fails during the timeout duration.Removes default exceptions from exceptions ignore list.
-
Method Details
-
getWait
org.openqa.selenium.support.ui.FluentWait getWait()Get the underlying selenium wait object- Returns:
- selenium wait
-
atMost
Configure timeout for this wait object.- Parameters:
duration
- duration- Returns:
this
object to chain method calls
-
atMost
Configure timeout for this wait object.- Parameters:
duration
- durationunit
- time unit- Returns:
this
object to chain method calls
-
atMost
Configure wait timeout for this wait object.- Parameters:
duration
- duration in millisecond- Returns:
this
object to chain method calls
-
pollingEvery
Configure polling time for this wait object.- Parameters:
duration
- duration between each condition invocation- Returns:
this
object to chain method calls
-
pollingEvery
Configure polling time for this wait object.- Parameters:
duration
- duration between each condition invocationunit
- time unit- Returns:
this
object to chain method calls
-
pollingEvery
Configure polling time for this wait object.- Parameters:
duration
- duration in millisecond between each condition invocation- Returns:
this
object to chain method calls
-
ignoreAll
Add given exceptions to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.- Parameters:
types
- collection of exception type to ignore- Returns:
this
object to chain method calls
-
ignoring
Add given exception to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.- Parameters:
exceptionType
- exception type to ignore- Returns:
this
object to chain method calls
-
ignoring
T ignoring(Class<? extends RuntimeException> firstType, Class<? extends RuntimeException> secondType) Add given exceptions to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.- Parameters:
firstType
- exception type to ignoresecondType
- exception type to ignore- Returns:
this
object to chain method calls
-
withMessage
Configures a custom message to be used if the condition fails during the timeout duration.- Parameters:
message
- failing message- Returns:
this
object to chain method calls
-
withMessage
Configures a custom message supplier to be used if the condition fails during the timeout duration.- Parameters:
message
- failing message- Returns:
this
object to chain method calls
-
hasMessageDefined
boolean hasMessageDefined()Check if a message is defined.- Returns:
- true if this fluent wait use a custom message, false otherwise
-
withNoDefaultsException
T withNoDefaultsException()Removes default exceptions from exceptions ignore list.- Returns:
this
object to chain method calls
-