Class Dom


  • public class Dom
    extends Object
    Handles XPath axes for an element (http://www.w3schools.com/xsl/xpath_axes.asp)
    • Constructor Detail

      • 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 Detail

      • 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
      • descendants

        public FluentList<FluentWebElement> descendants()
        Find descendants elements (children, grandchildren, etc.).
        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