XPath allows navigating and finding elements and attributes in an HTML document. XPath uses path expressions to navigate in HTML documents. QTP allows XPath to create the object description, for example:
xpath:=//input[@type='image' and contains(@name,'findFlights')
In the following section, we will learn the various XPath terminologies and methodologies to find the objects using XPath.
XPath uses various terms to define elements and their relationships among HTML elements, as shown in the following table:
Atomic values are nodes with no children or parent | |
A node's parent, parent's parent, and so on | |
A node's children, children's children, and so on | |
Each element and attribute has one parent | |
Element nodes may have zero, one, or more children | |
Nodes that have the same parent |