- Absolute xpath
- Relative xpath
Absolute xpath is the direct way to find the element, but the disadvantage of the absolute XPath is that if there are any changes made in the path of the element then that XPath gets failed, but in relative xpath it will directly come to the middle of the dom specified by us and the xpath will be small