Interface FluentWaitConditions<T>

Type Parameters:
T - this object type to chain method calls
All Known Implementing Classes:
FluentWait, FluentWaitElement, FluentWaitElementList

public interface FluentWaitConditions<T>
Conditions API for Fluent wait objects.
  • 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

      FluentListConditions until (List<? extends FluentWebElement> elements)
      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

      FluentListConditions untilEach (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
    • untilElement

      FluentConditions untilElement (Supplier<? extends FluentWebElement> element)
      Get a conditions object used to wait for a condition on given element.
      Parameters:
      element - element to wait for
      Returns:
      conditions object
    • untilElements

      FluentListConditions untilElements (Supplier<? extends List<? extends FluentWebElement>> elements)
      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

      FluentWaitWindowConditions untilWindow (String windowName)
      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

      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

      T explicitlyFor (long amount, TimeUnit timeUnit)
      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
      timeUnit - unit of time
      Returns:
      this object to chain method calls
    • explicitlyFor

      default T explicitlyFor (long amount)
      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

      T untilAsserted (Runnable block)
      waits until a Runnable 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