Class Dom

java.lang.Object
io.fluentlenium.core.dom.Dom

public class Dom extends Object
Handles XPath axes for an element (W3Schools XPath Axes).
  • Constructor Details

    • Dom

      public Dom (org.openqa.selenium.WebElement element, ComponentInstantiator instantiator)
      Creates a new axes object to find other elements based on XPath axes.
      Parameters:
      element - reference element
      instantiator - component instantiator used to build found elements.
  • Method Details

    • parent

      public FluentWebElement parent()
      Find parent element.
      Returns:
      fluent web element
    • handleAxe

      protected FluentList<FluentWebElement> handleAxe (String axe)
      Handle an XPath axe
      Parameters:
      axe - axe to handle
      Returns:
      list of found elements
    • ancestors

      public FluentList<FluentWebElement> ancestors()
      Find ancestor elements.
      Returns:
      list of Fluent web elements
    • descendants

      public FluentList<FluentWebElement> descendants()
      Find descendants elements (children, grandchildren, etc.).
      Returns:
      list of Fluent web elements
    • followings

      public FluentList<FluentWebElement> followings()
      Find following elements.
      Returns:
      list of Fluent web elements
    • followingSiblings

      public FluentList<FluentWebElement> followingSiblings()
      Find following sibling elements.
      Returns:
      list of Fluent web elements
    • precedings

      public FluentList<FluentWebElement> precedings()
      Find preceding elements. (Ancestors are NOT included)
      Returns:
      list of Fluent web elements
    • precedingSiblings

      public FluentList<FluentWebElement> precedingSiblings()
      Find preceding sibling elements.
      Returns:
      list of Fluent web elements