Package io.fluentlenium.core.dom
Class Dom
java.lang.Object
io.fluentlenium.core.dom.Dom
Handles XPath axes for an element (W3Schools XPath Axes).
-
Constructor Summary
ConstructorDescriptionDom
(org.openqa.selenium.WebElement element, ComponentInstantiator instantiator) Creates a new axes object to find other elements based on XPath axes. -
Method Summary
Modifier and TypeMethodDescriptionFind ancestor elements.Find descendants elements (children, grandchildren, etc.).Find following elements.Find following sibling elements.protected FluentList<FluentWebElement>
Handle an XPath axeparent()
Find parent element.Find preceding elements.Find preceding sibling elements.
-
Constructor Details
-
Dom
Creates a new axes object to find other elements based on XPath axes.- Parameters:
element
- reference elementinstantiator
- component instantiator used to build found elements.
-
-
Method Details
-
parent
Find parent element.- Returns:
- fluent web element
-
handleAxe
Handle an XPath axe- Parameters:
axe
- axe to handle- Returns:
- list of found elements
-
ancestors
Find ancestor elements.- Returns:
- list of Fluent web elements
-
descendants
Find descendants elements (children, grandchildren, etc.).- Returns:
- list of Fluent web elements
-
followings
Find following elements.- Returns:
- list of Fluent web elements
-
followingSiblings
Find following sibling elements.- Returns:
- list of Fluent web elements
-
precedings
Find preceding elements. (Ancestors are NOT included)- Returns:
- list of Fluent web elements
-
precedingSiblings
Find preceding sibling elements.- Returns:
- list of Fluent web elements
-