public class FluentWaitElementList extends java.lang.Object implements FluentWaitFunctional<FluentControl>, FluentWaitConditions<FluentWaitElementList>, FluentWaitConfiguration<FluentWaitElementList>
FluentWait object into a more
complete API, allowing to wait for any condition to be verified on underlying elements.| Constructor and Description |
|---|
FluentWaitElementList(FluentWait controlWait,
java.util.List<? extends FluentWebElement> elements)
Creates a new fluent wait for a given elements.
|
| Modifier and Type | Method and Description |
|---|---|
FluentWaitElementList |
atMost(java.time.Duration duration)
Configure timeout for this wait object.
|
FluentWaitElementList |
atMost(long timeInMillis)
Configure wait timeout for this wait object.
|
FluentWaitElementList |
atMost(long duration,
java.util.concurrent.TimeUnit unit)
Configure timeout for this wait object.
|
FluentWaitElementList |
explicitlyFor(long amount)
Waits unconditionally for an explicit amount of time.
|
FluentWaitElementList |
explicitlyFor(long amount,
java.util.concurrent.TimeUnit timeUnit)
Waits unconditionally for an explicit amount of time.
|
org.openqa.selenium.support.ui.FluentWait |
getWait()
Get the underlying selenium wait object
|
boolean |
hasMessageDefined()
Check if a message is defined.
|
FluentWaitElementList |
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.
|
FluentWaitElementList |
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.
|
FluentWaitElementList |
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.
|
FluentWaitElementList |
pollingEvery(java.time.Duration duration)
Configure polling time for this wait object.
|
FluentWaitElementList |
pollingEvery(long duration)
Configure polling time for this wait object.
|
FluentWaitElementList |
pollingEvery(long duration,
java.util.concurrent.TimeUnit unit)
Configure polling time for this wait object.
|
FluentConditions |
until()
Get a conditions object used to wait for condition on current elements.
|
FluentConditions |
until(FluentWebElement element)
Get a conditions object used to wait for condition on given element.
|
<T> T |
until(java.util.function.Function<? super FluentControl,T> function)
Wait until the function returns a non-null and non-false object.
|
<T> T |
until(com.google.common.base.Function<? super FluentControl,T> function)
Deprecated.
|
FluentListConditions |
until(java.util.List<? extends FluentWebElement> elements)
Get a conditions object used to wait for a condition on given elements.
|
void |
until(java.util.function.Supplier<java.lang.Boolean> supplier)
Wait until the supplier returns true.
|
FluentConditions |
untilEach()
Get a conditions object used to wait for condition on current elements.
|
FluentListConditions |
untilEach(java.util.List<? extends FluentWebElement> elements)
Get a conditions object used to wait for a condition on given elements.
|
FluentListConditions |
untilEachElements(java.util.function.Supplier<? extends java.util.List<? extends FluentWebElement>> selector)
Get a conditions object used to wait for a condition on given elements.
|
FluentConditions |
untilElement(java.util.function.Supplier<? extends FluentWebElement> selector)
Get a conditions object used to wait for a condition on given element.
|
FluentListConditions |
untilElements(java.util.function.Supplier<? extends java.util.List<? extends FluentWebElement>> selector)
Get a conditions object used to wait for a condition on given elements.
|
FluentWaitPageConditions |
untilPage()
Get a condition object used to wait for a page condition.
|
FluentWaitPageConditions |
untilPage(FluentPage page)
Get a condition object used to wait for a page condition.
|
void |
untilPredicate(java.util.function.Predicate<FluentControl> predicate)
Wait until the predicate returns true.
|
FluentWaitWindowConditions |
untilWindow(java.lang.String windowName)
Get a condition object used to wait for a window condition.
|
FluentWaitElementList |
withMessage(java.lang.String message)
Configures a custom message to be used if the condition fails during the timeout duration.
|
FluentWaitElementList |
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.
|
FluentWaitElementList |
withNoDefaultsException()
Removes default exceptions from exceptions ignore list.
|
public FluentWaitElementList(FluentWait controlWait, java.util.List<? extends FluentWebElement> elements)
controlWait - underlying wait from control interfaceelements - underlying elementspublic FluentConditions until()
At least one element must verify the condition to be verified.
public FluentConditions untilEach()
Each element must verify the condition to be verified.
public org.openqa.selenium.support.ui.FluentWait getWait()
FluentWaitConfigurationgetWait in interface FluentWaitConfiguration<FluentWaitElementList>public FluentWaitElementList atMost(java.time.Duration duration)
FluentWaitConfigurationatMost in interface FluentWaitConfiguration<FluentWaitElementList>duration - durationthis object to chain method callspublic FluentWaitElementList atMost(long duration, java.util.concurrent.TimeUnit unit)
FluentWaitConfigurationatMost in interface FluentWaitConfiguration<FluentWaitElementList>duration - durationunit - time unitthis object to chain method callspublic FluentWaitElementList atMost(long timeInMillis)
FluentWaitConfigurationatMost in interface FluentWaitConfiguration<FluentWaitElementList>timeInMillis - duration in millisecondthis object to chain method callspublic FluentWaitElementList pollingEvery(java.time.Duration duration)
FluentWaitConfigurationpollingEvery in interface FluentWaitConfiguration<FluentWaitElementList>duration - duration between each condition invocationthis object to chain method callspublic FluentWaitElementList pollingEvery(long duration, java.util.concurrent.TimeUnit unit)
FluentWaitConfigurationpollingEvery in interface FluentWaitConfiguration<FluentWaitElementList>duration - duration between each condition invocationunit - time unitthis object to chain method callspublic FluentWaitElementList pollingEvery(long duration)
FluentWaitConfigurationpollingEvery in interface FluentWaitConfiguration<FluentWaitElementList>duration - duration in millisecond between each condition invocationthis object to chain method callspublic FluentWaitElementList ignoreAll(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> types)
FluentWaitConfigurationignoreAll in interface FluentWaitConfiguration<FluentWaitElementList>types - collection of exception type to ignorethis object to chain method callspublic FluentWaitElementList ignoring(java.lang.Class<? extends java.lang.RuntimeException> exceptionType)
FluentWaitConfigurationignoring in interface FluentWaitConfiguration<FluentWaitElementList>exceptionType - exception type to ignorethis object to chain method callspublic FluentWaitElementList ignoring(java.lang.Class<? extends java.lang.RuntimeException> firstType, java.lang.Class<? extends java.lang.RuntimeException> secondType)
FluentWaitConfigurationignoring in interface FluentWaitConfiguration<FluentWaitElementList>firstType - exception type to ignoresecondType - exception type to ignorethis object to chain method callspublic void untilPredicate(java.util.function.Predicate<FluentControl> predicate)
FluentWaitFunctionaluntilPredicate in interface FluentWaitFunctional<FluentControl>predicate - predicate condition to wait forpublic void until(java.util.function.Supplier<java.lang.Boolean> supplier)
FluentWaitFunctionaluntil in interface FluentWaitFunctional<FluentControl>supplier - supplier condition to wait for.public <T> T until(java.util.function.Function<? super FluentControl,T> function)
FluentWaitFunctionaluntil in interface FluentWaitFunctional<FluentControl>until in interface org.openqa.selenium.support.ui.Wait<FluentControl>T - type of returned objectfunction - function returning a non-null and non-false object when condition is verified.public FluentWaitElementList withMessage(java.lang.String message)
FluentWaitConfigurationwithMessage in interface FluentWaitConfiguration<FluentWaitElementList>message - failing messagethis object to chain method callspublic FluentWaitElementList withMessage(java.util.function.Supplier<java.lang.String> message)
FluentWaitConfigurationwithMessage in interface FluentWaitConfiguration<FluentWaitElementList>message - failing messagethis object to chain method callspublic boolean hasMessageDefined()
FluentWaitConfigurationhasMessageDefined in interface FluentWaitConfiguration<FluentWaitElementList>public FluentWaitElementList withNoDefaultsException()
FluentWaitConfigurationwithNoDefaultsException in interface FluentWaitConfiguration<FluentWaitElementList>this object to chain method callspublic FluentConditions until(FluentWebElement element)
FluentWaitConditionsuntil in interface FluentWaitConditions<FluentWaitElementList>element - element to wait forpublic FluentListConditions until(java.util.List<? extends FluentWebElement> elements)
FluentWaitConditionsAt least one element must verify the condition to be verified.
until in interface FluentWaitConditions<FluentWaitElementList>elements - elements to wait forpublic FluentListConditions untilEach(java.util.List<? extends FluentWebElement> elements)
FluentWaitConditionsEach element must verify the condition to be verified.
untilEach in interface FluentWaitConditions<FluentWaitElementList>elements - elements to wait forpublic FluentConditions untilElement(java.util.function.Supplier<? extends FluentWebElement> selector)
FluentWaitConditionsuntilElement in interface FluentWaitConditions<FluentWaitElementList>selector - element to wait forpublic FluentListConditions untilElements(java.util.function.Supplier<? extends java.util.List<? extends FluentWebElement>> selector)
FluentWaitConditionsAt least one element must verify the condition to be verified.
untilElements in interface FluentWaitConditions<FluentWaitElementList>selector - elements to wait forpublic FluentListConditions untilEachElements(java.util.function.Supplier<? extends java.util.List<? extends FluentWebElement>> selector)
FluentWaitConditionsEach element must verify the condition to be verified.
untilEachElements in interface FluentWaitConditions<FluentWaitElementList>selector - elements to wait forpublic FluentWaitWindowConditions untilWindow(java.lang.String windowName)
FluentWaitConditionsuntilWindow in interface FluentWaitConditions<FluentWaitElementList>windowName - name of the window to wait forpublic FluentWaitPageConditions untilPage()
FluentWaitConditionsuntilPage in interface FluentWaitConditions<FluentWaitElementList>public FluentWaitPageConditions untilPage(FluentPage page)
FluentWaitConditionsuntilPage in interface FluentWaitConditions<FluentWaitElementList>page - page to wait forpublic FluentWaitElementList explicitlyFor(long amount, java.util.concurrent.TimeUnit timeUnit)
FluentWaitConditionsThe method should be used only as a last resort.
In most cases you should wait for some condition, e.g. visibility of particular element on the page.
explicitlyFor in interface FluentWaitConditions<FluentWaitElementList>amount - amount of timetimeUnit - unit of timethis object to chain method callspublic FluentWaitElementList explicitlyFor(long amount)
FluentWaitConditionsThe method should be used only as a last resort.
In most cases you should wait for some condition, e.g. visibility of particular element on the page.
explicitlyFor in interface FluentWaitConditions<FluentWaitElementList>amount - amount of time to wait in millisecondsthis object to chain method calls@Deprecated public <T> T until(com.google.common.base.Function<? super FluentControl,T> function)
T - FluentWaitElementListfunction - function to be performedCopyright © 2018 FluentLenium. All Rights Reserved.