Package org.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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default T
atMost(long duration)
Configure wait timeout for this wait object.default T
atMost(long duration, TimeUnit unit)
Configure timeout for this wait object.T
atMost(Duration duration)
Configure timeout for this wait object.org.openqa.selenium.support.ui.FluentWait
getWait()
Get the underlying selenium wait objectboolean
hasMessageDefined()
Check if a message is defined.T
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.T
ignoring(Class<? extends RuntimeException> exceptionType)
Add given exception to ignore list to avoid breaking the wait when they occurs in the underlying condition evaluation.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.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.T
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.T
withMessage(Supplier<String> message)
Configures a custom message supplier to be used if the condition fails during the timeout duration.T
withNoDefaultsException()
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(Duration duration)
Configure timeout for this wait object.- Parameters:
duration
- duration- Returns:
this
object to chain method calls
-
atMost
default T atMost(long duration, TimeUnit unit)
Configure timeout for this wait object.- Parameters:
duration
- durationunit
- time unit- Returns:
this
object to chain method calls
-
atMost
default T atMost(long duration)
Configure wait timeout for this wait object.- Parameters:
duration
- duration in millisecond- Returns:
this
object to chain method calls
-
pollingEvery
T pollingEvery(Duration duration)
Configure polling time for this wait object.- Parameters:
duration
- duration between each condition invocation- Returns:
this
object to chain method calls
-
pollingEvery
default T pollingEvery(long duration, TimeUnit unit)
Configure polling time for this wait object.- Parameters:
duration
- duration between each condition invocationunit
- time unit- Returns:
this
object 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:
this
object to chain method calls
-
ignoreAll
T 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.- Parameters:
types
- collection of exception type to ignore- Returns:
this
object to chain method calls
-
ignoring
T ignoring(Class<? extends 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:
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
default T withMessage(String message)
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
T withMessage(Supplier<String> message)
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
-
-