Myths & Misconceptions about XPath Plugin- SelectorsHub

Sanjay Kumar
2 min readSep 28, 2021

--

Due to the past experience of the XPath plugins, whenever we talk about XPath Plugins we think that it gives only auto generated XPath so we should not use XPath Plugins.

But this is not true with SelectorsHub because SelectorsHub is the smart editor for XPath & selectors, in fact SelectorsHub is the right platform to verify XPath & selectors which gives the right match count and information about xpath and web element.

Write and Verify XPath in SelectorsHub

SelectorsHub suggests proper error message if there is any thing wrong in xpath or selectors. It also recommends how to fix the XPath.

SelectorsHub gives the right information about XPath and web element. SelectorsHub supports shadow dom.
SelectorsHub XPath Plugin gives proper error message with fix for invalid xpath

When we verify XPath in DevTools by cmd+f , it includes the string match as well in the total matching counts because of which many a times we get the wrong match count for xpath and our script fails.

DevTools includes String match as well while verifying XPath

Also DevTools shows the 0 match count for the invalid xpath due to which in place of fixing the issue in xpath, we start wasting time to write the new xpath.

DevTools showing 0 match count for invalid Xpath

Writing own XPath is very much preferable and recommended but understand which is the right platform to write and verify xpath and selectors.
Checkout the below tutorial to learn more about these facts.

--

--

Sanjay Kumar
Sanjay Kumar

Written by Sanjay Kumar

Founder and Creator of SelectorsHub, TestCase Studio, TestCaseHub & ChroPath | Speaker | Blogger | Automation Passionate

Responses (2)