How to use Chropath for locating web element in selenium

721    Asked by EmmaLewis in Python , Asked on Jul 22, 2021

 How to use Chropath for locating web element in selenium?

Answered by Claudine Tippins

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.

On the right side of the Elements tab, click on the ChroPath tab. If ChroPath is not visible then click on the arrow icon >>. ChroPath will be shown as the last tab in the 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.



Your Answer

Interviews

Parent Categories