Please find all the important SelectorsHub links here-

  1. SelectorsHub home page & download link-
    https://selectorshub.com/
  2. SelectorsHub Detailed Tutorial-
    https://youtu.be/jV84DRg96qs
  3. Learn all about SelectorsHub here at SelectorsHub Youtube Channel, Link-
    https://www.youtube.com/c/SelectorsHubTheXPathTool?sub_confirmation=1
  4. SelectorsHub Udemy Course Link-
    https://www.udemy.com/course/selectorshub-tutorial-a-free-next-gen-xpath-locators-tool/
  5. SelectorsHub LinkedIN page-
    https://www.linkedin.com/company/selectorshub/
  6. SelectorsHub Twitter Handle-
    https://twitter.com/SelectorsHub
  7. SelectorsHub Telegram group link-
    https://t.me/joinchat/FICcWBskxzC1kCa9
  8. SelectorsHub Slack Channel link-
    https://join.slack.com/t/selectorshub/shared_invite/zt-fho3ep1h-mkjFOdKqmtYWwNVyV8tLSg
  9. SelectorsHub Review -
    https://chrome.google.com/webstore/detail/selectorshub/ndgimibanhlabgdgjcpbbndiehljcpfh/reviews
  10. Be a SelectorsHub Patron here-
    https://www.patreon.com/sanjaykumar_selectorshub
  11. Buy a coffee for SelectorsHub here
    https://www.buymeacoffee.com/SelectorsHub
  12. Donate via PayPal-
    http://paypal.me/sanjayselectorshub
  13. Donate through GooglePay Paytm or PhonePe-
    9663877336


  1. Shadow DOM elements can’t be directly access by using selenium only.
  2. To access shadow DOM elements we need to use Java Script.
  3. And as per W3C standard, there is a limitation that closed shadow root elements can’t be accessed through Java Script.
    Reference-
    https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/mode
  4. To learn about this with practical example, please this video tutorial.

Note: Use SelectorsHub to handle shadow dom elements. It will give complete information what is not possible and what is possible along with script.

Write selectors for Shadow DOM elements!!

How to open Selenium Browser Window with SelectorsHub

To open the automated browser window with SelectorsHub follow these steps-

1. Copy the SelectorsHub chrome store url.

https://chrome.google.com/webstore/detail/selectorshub/ndgimibanhlabgdgjcpbbndiehljcpfh/

2. Open a new tab with url http://crxextractor.com/ and click on ‘Start for Free’ then paste the SelectorsHub chrome store url given in step1 into the textfield. Click on download the crx to your local.

3. Now add the below lines of code into your script before initiating the WebDriver instance in your script:

ChromeOptions options = new ChromeOptions();

options.addExtensions(new File(“path of the crx extension on your local machine”));

driver = new ChromeDriver(options);

5. That’s all. SelectorsHub extension is now enabled…


SelectorsHub: The XPath Smart Editor

Writing own XPath is very important & must have skill for every automation tester.

Apart from how to write XPath, it is very important to learn where to write and verify XPath. Most of the people are not aware that “DevTools is not the right platform to verify XPath & Selectors because it doesn’t support shadow DOM, nested iframe and it also includes string matches in total results.” Learn more about it here with real time scenario.

SelectorsHub is the standard and the very first smart editor to write and verify XPath & CSS Selector. …


DevTools Console is not the right platform to verify XPath & CSS Selectors.

DevTools Console/Find is not the right platform to verify XPath & CSS Selector because it doesn’t provide the right info for XPath & CSS Selectors.

We never talked about this basic concepts and always considered DevTools as standard platform due to lack of innovations.

SelectorsHub is the standard and right platform to write and verify the XPath & CSS Selector.

Please watch this live demo & learn about this concept and spread the awareness.


SelectorsHub is the Next Gen locators tool to generate, write and verify the XPath and cssSelectors. It’s a FREE browser extension available for all browsers.

SelectorsHub Features: A must have time saver tool for automation testers
  • Smart editor which auto suggest all possible XPath & selectors functions along with their occurrences while typing.
  • Generate all types of possible selectors for inspected element in single click.
  • Error handling. It gives the proper error message like what is wrong in your xpath and cssSelector.
  • Supports iframe and nested iframes.
  • Supports shadow dom and nested shadow dom.
  • Support SVG elements.
  • Gives proper information about what kind of the inspected element it is like svg…

Not able to find SelectorsHub in browser

Though it’s very simple to use SelectorsHub but sometimes for few users these issues comes.

In fact none of these are issues of SelectorsHub, most of them are because of browser settings.

Don’t worry here is the solution for every issue related to SelectorsHub and hardly it will take 30sec for you to fix it.

SelectorsHub Download Link for all the browsers

Not able to find SelectorsHub in DevTools:

  • After adding SelectorsHub, restart your browser.
  • Right-click anywhere on the webpage.
  • Click on Inspect.
  • In the DevTools, SelectorsHub is present as last sidebar tab followed by Style, Computed, Event Listeners, DOM Breakpoints, Properties and Accessibility then SelectorsHub. If…

We can’t access the shadow dom elements like other web elements.

Like driver.findElement(..) can’t be used directly to handle shadow dom elements.

  1. Here first we need to locate the host element of shadow root then
  2. Get the access of shadow dom using JS through host element, it can be called as last element.
  3. Now shadow dom elements can be accessed using this last element.

Sample script-

//This Element is inside single shadow DOM.
String cssSelectorForHost1 = “book-app[apptitle=’BOOKS’]”;
Thread.sleep(1000);
WebElement shadowDomHostElement = driver.findElement(By.cssSelector(“book-app[apptitle=’BOOKS’]”));
WebElement last = (WebElement) ((JavascriptExecutor) driver).executeScript(“return arguments[0].shadowRoot”, shadowDomHostElement);
Thread.sleep(1000);
last.findElement(By.cssSelector(“#input”));


How to inspect dynamic WebElement

Many a times we found certain dropdown and auto suggest elements which disappear immediately as we click or right click.

As these elements immediately disappear so it becomes almost impossible to inspect and if we try through DevTools it takes too much time.

But now SelectorsHub has made it possible with its debugger feature.

With help of SelectorsHub’s debugger feature any dynamic element could be inspected just in few seconds.

Checkout here “How to use SelectorsHub’s Debugger Feature to inspect any dynamic and invisible web element?”

Download Link of SelectorsHub — https://selectorshub.com/


  • SelectorsHub Certification Program is a FREE certification program created by me (Sanjay Kumar, Founder & Creator of SelectorsHub).
  • This program has 27 simple yet tricky objective type questions on strong fundamental concepts of XPath, locators and SelectorsHub.
  • The main purpose of SelectorsHub Certification is to help you to learn new & basic concepts of XPath, locators and SelectorsHub.
  • This certification is to spread the awareness on the misconceptions and wrong methods which we all followed while writing XPath & selectors due to lack of innovations.
  • This certification will help you to brush up your knowledge on fundamental concepts.
  • On scoring minimum 75% (21/27), you will get the SelectorsHub Certificate.
  • Take this brain storming exam and learn the new things about XPath, selectors and SelectorsHub.
  • SelectorsHub Certification Link

Sanjay Kumar | Upgrade to SelectorsHub - XPathTool

Creator of SelectorsHub & ChroPath | Speaker | Blogger | Automation Passionate

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store