How do you find XPath?

How do you find XPath?

If you’re using Chrome, use these steps to find XPath:

  1. Right-click and select ‘Inspect’ on the item where you want to locate the XPath.
  2. Right-click on the HTML DOM’s highlighted area.
  3. Select ‘Copy XPath’ from the Copy menu.
  4. Following the preceding step, you will obtain the element’s absolute XPath from the DOM.