



So, the relative XPath is preferred over the absolute XPath. But, there is one disadvantage of the absolute XPath it fails if there is any change in the structure of the webpage.

So, the relative XPath is preferred over the absolute XPath. But, there is one disadvantage of the absolute XPath it fails if there is any change in the structure of the webpage.