Login

Lost your password?
Don't have an account? Sign Up

How to handle #ShadowDom elements in Selenium || What is ShadowDom & ShadowRoot in DOM

#ShadowDom #NaveenAutomationLabs
In this video, I have explained How to handle #ShadowDom elements in Selenium

What is ShadowDom & ShadowRoot in DOM
How to query ShadowDom elements using querySelector
How to create shadow Dom element using JavaScript and execute it using JavaScript Executor in Selenium

GIT REPO FOR THIS EXAMPLE:

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:

For Java & Selenium –

For API (Manual + Automation) –

https://www.educational.guru

24 comments

  1. Ishan Navgire

    Hi Naveen,
    Thank you for covering this topic. Accessing elements inside a shadow DOM works fine for Chrome browser, but it fails for firefox with error “circular object reference”. Did you come across this error by any chance? If yes, how did you resolve it?

  2. Bhushan Deshpande

    Great topic coverage Naveen !!! Thanks a lot… I followed the steps and created JS query in my project, it is working in console, but in test script it is failing with error “Cannot read properties of null (reading ‘shadowRoot’)”. I’m working on selenium 3 with Java. Can you please help??

  3. Saurabh Gupta

    I wanted to automate chrome:downloads section once, but I never knew why I was not able to interact with the element. With this video now I know the reason.
    Thank you for the video Naveen ❤️

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*