๐ Parent XPath Axis
๐ Syntax:
parent::
๐ Practical Demonstration:
//p[@id='para1']/parent::body
//p[@id='para1']/parent::body/parent::html
//title/parent::head/parent::html
๐ Explanation:
* parent:: selects the immediate parent of the current node
* You can chain parent:: to move up multiple levels in the DOM
#XPath #AutomationTesting #Selenium #WebTesting