Interface FluentWaitConditions<T>
- Type Parameters:
T
-this
object type to chain method calls
- All Known Implementing Classes:
FluentWait
,FluentWaitElement
,FluentWaitElementList
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
explicitlyFor
(long amount) Waits unconditionally for an explicit amount of time.explicitlyFor
(long amount, TimeUnit timeUnit) Waits unconditionally for an explicit amount of time.until
(List<? extends FluentWebElement> elements) Get a conditions object used to wait for a condition on given elements.until
(FluentWebElement element) Get a conditions object used to wait for condition on given element.untilAsserted
(Runnable block) waits until aRunnable
block execution ends without throwing an exception.untilEach
(List<? extends FluentWebElement> elements) Get a conditions object used to wait for a condition on given elements.untilEachElements
(Supplier<? extends List<? extends FluentWebElement>> elements) Get a conditions object used to wait for a condition on given elements.untilElement
(Supplier<? extends FluentWebElement> element) Get a conditions object used to wait for a condition on given element.untilElements
(Supplier<? extends List<? extends FluentWebElement>> elements) Get a conditions object used to wait for a condition on given elements.Get a condition object used to wait for a page condition.untilPage
(FluentPage page) Get a condition object used to wait for a page condition.untilWindow
(String windowName) Get a condition object used to wait for a window condition.
-
Method Details
-
until
Get a conditions object used to wait for condition on given element.- Parameters:
element
- element to wait for- Returns:
- conditions object
-
until
Get a conditions object used to wait for a condition on given elements.At least one element must verify the condition to be verified.
- Parameters:
elements
- elements to wait for- Returns:
- conditions object
-
untilEach
Get a conditions object used to wait for a condition on given elements.Each element must verify the condition to be verified.
- Parameters:
elements
- elements to wait for- Returns:
- conditions object
-
untilElement
Get a conditions object used to wait for a condition on given element.- Parameters:
element
- element to wait for- Returns:
- conditions object
-
untilElements
Get a conditions object used to wait for a condition on given elements.At least one element must verify the condition to be verified.
- Parameters:
elements
- elements to wait for- Returns:
- conditions object
-
untilEachElements
FluentListConditions untilEachElements(Supplier<? extends List<? extends FluentWebElement>> elements) Get a conditions object used to wait for a condition on given elements.Each element must verify the condition to be verified.
- Parameters:
elements
- elements to wait for- Returns:
- conditions object
-
untilWindow
Get a condition object used to wait for a window condition.- Parameters:
windowName
- name of the window to wait for- Returns:
- window conditions object
-
untilPage
FluentWaitPageConditions untilPage()Get a condition object used to wait for a page condition.- Returns:
- page conditions object
-
untilPage
Get a condition object used to wait for a page condition.- Parameters:
page
- page to wait for- Returns:
- page conditions object
-
explicitlyFor
Waits unconditionally for an explicit amount of time.The 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.
- Parameters:
amount
- amount of timetimeUnit
- unit of time- Returns:
this
object to chain method calls
-
explicitlyFor
Waits unconditionally for an explicit amount of time.The 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.
- Parameters:
amount
- amount of time to wait in milliseconds- Returns:
this
object to chain method calls
-
untilAsserted
waits until aRunnable
block execution ends without throwing an exception. The method is intended to be used with Java 8 Lambda expressions. This allows to use AssertJ/JUnit/TestNG assertions to periodically check for conditions.await().untilAsserted(() -> assertThat(window().title()).isEqualTo("Fluentlenium"));
- Parameters:
block
- the code block that is responsible for executing the assertion and throwing AssertionError on failure.- Returns:
this
object to chain method calls
-