Interface FluentProxyState<T>

Type Parameters:
T - type of the locator handler result
All Known Subinterfaces:
FluentList<E>
All Known Implementing Classes:
FluentListImpl, FluentWebElement

public interface FluentProxyState<T>
State of the element locator proxy.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if the element is loaded.
    T
    now()
    Search for the element now, actually performing the search on the WebDriver.
    T
    now (boolean force)
    Search for the element now, actually performing the search on the WebDriver.
    Builds an optional.
    boolean
    Check if the element is present in the DOM.
    T
    Reset the element.
  • Method Details

    • present

      boolean present()
      Check if the element is present in the DOM.
      Returns:
      true if the element is present, false otherwise
    • now

      T now()
      Search for the element now, actually performing the search on the WebDriver.

      It has no effect if the element is already loaded.

      Returns:
      this object reference to chain calls.
      Throws:
      org.openqa.selenium.NoSuchElementException - if the element is not present, and has never been.
      org.openqa.selenium.StaleElementReferenceException - if the element has been present, but is not present anymore.
    • now

      T now (boolean force)
      Search for the element now, actually performing the search on the WebDriver.

      It has no effect if the element is already loaded.

      Parameters:
      force - force the search even if element is already loaded
      Returns:
      this object reference to chain calls.
      Throws:
      org.openqa.selenium.NoSuchElementException - if the element is not present, and has never been.
      org.openqa.selenium.StaleElementReferenceException - if the element has been present, but is not present anymore.
    • reset

      T reset()
      Reset the element. Subsequent calls will perform the search again, instead of using the cached result.
      Returns:
      this object reference to chain calls.
    • loaded

      boolean loaded()
      Check if the element is loaded.
      Returns:
      true if the element is loaded, false otherwise
    • optional

      Optional<T> optional()
      Builds an optional. If underlying element is lazy, search will be perfomed when invoking this method.
      Returns:
      An optional wrapping this.
      See Also: