Package org.fluentlenium.core.wait
Interface FluentWaitConfiguration<T>
-
- Type Parameters:
T-thisobject type to chain method calls
- All Known Implementing Classes:
FluentWait,FluentWaitElement,FluentWaitElementList
public interface FluentWaitConfiguration<T>Configuration API of fluent wait object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default TatMost(long duration)Configure wait timeout for this wait object.default TatMost(long duration, java.util.concurrent.TimeUnit unit)Configure timeout for this wait object.TatMost(java.time.Duration duration)Configure timeout for this wait object.org.openqa.selenium.support.ui.FluentWaitgetWait()Get the underlying selenium wait objectbooleanhasMessageDefined()Check if a message is defined.TignoreAll(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> types)Add given exceptions to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.Tignoring(java.lang.Class<? extends java.lang.RuntimeException> exceptionType)Add given exception to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.Tignoring(java.lang.Class<? extends java.lang.RuntimeException> firstType, java.lang.Class<? extends java.lang.RuntimeException> secondType)Add given exceptions to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.default TpollingEvery(long duration)Configure polling time for this wait object.default TpollingEvery(long duration, java.util.concurrent.TimeUnit unit)Configure polling time for this wait object.TpollingEvery(java.time.Duration duration)Configure polling time for this wait object.default TwithMessage(java.lang.String message)Configures a custom message to be used if the condition fails during the timeout duration.TwithMessage(java.util.function.Supplier<java.lang.String> message)Configures a custom message supplier to be used if the condition fails during the timeout duration.TwithNoDefaultsException()Removes default exceptions from exceptions ignore list.
-
-
-
Method Detail
-
getWait
org.openqa.selenium.support.ui.FluentWait getWait()
Get the underlying selenium wait object- Returns:
- selenium wait
-
atMost
T atMost(java.time.Duration duration)
Configure timeout for this wait object.- Parameters:
duration- duration- Returns:
thisobject to chain method calls
-
atMost
default T atMost(long duration, java.util.concurrent.TimeUnit unit)
Configure timeout for this wait object.- Parameters:
duration- durationunit- time unit- Returns:
thisobject to chain method calls
-
atMost
default T atMost(long duration)
Configure wait timeout for this wait object.- Parameters:
duration- duration in millisecond- Returns:
thisobject to chain method calls
-
pollingEvery
T pollingEvery(java.time.Duration duration)
Configure polling time for this wait object.- Parameters:
duration- duration between each condition invocation- Returns:
thisobject to chain method calls
-
pollingEvery
default T pollingEvery(long duration, java.util.concurrent.TimeUnit unit)
Configure polling time for this wait object.- Parameters:
duration- duration between each condition invocationunit- time unit- Returns:
thisobject to chain method calls
-
pollingEvery
default T pollingEvery(long duration)
Configure polling time for this wait object.- Parameters:
duration- duration in millisecond between each condition invocation- Returns:
thisobject to chain method calls
-
ignoreAll
T ignoreAll(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> types)
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:
thisobject to chain method calls
-
ignoring
T ignoring(java.lang.Class<? extends java.lang.RuntimeException> exceptionType)
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:
thisobject to chain method calls
-
ignoring
T ignoring(java.lang.Class<? extends java.lang.RuntimeException> firstType, java.lang.Class<? extends java.lang.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:
thisobject to chain method calls
-
withMessage
default T withMessage(java.lang.String message)
Configures a custom message to be used if the condition fails during the timeout duration.- Parameters:
message- failing message- Returns:
thisobject to chain method calls
-
withMessage
T withMessage(java.util.function.Supplier<java.lang.String> message)
Configures a custom message supplier to be used if the condition fails during the timeout duration.- Parameters:
message- failing message- Returns:
thisobject 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:
thisobject to chain method calls
-
-