Hey Angad, you can follow these steps to use Chropath for locating elements:
-
After installing ChroPath extension, reload the page for which you want to use it.
-
Right-click on the web page, and then click Inspect.
-
In the right side of Elements tab, click on ChroPath tab. If ChroPath is not visible then click on the arrow icon >>. ChroPath will be shown as last tab in sidebar.
-
To generate XPath inspect element or click on any dom node, it will generate the absolute and relative XPath selector for the selected node.
-
To evaluate XPath, type the XPath query and press enter key. As you enter, it will query in DOM for the relevant element/node. A dashed blue outline appears around to highlight the matching elements in the web page.
For further understanding, you can refer to the Selenium Training.