And to add to Tarcisio's answer, in your case, where they are nested, you just have to repeat the process using the same strategy, like this:
document
.querySelector("outer-component")
.shadowRoot.querySelector("inner-component")
.shadowRoot.querySelector("input[name='username']");
------------------------------
Vinicius Marques
Data Engineer
Music.AI
Rio Grande
------------------------------
Original Message:
Sent: Fri November 14, 2025 09:25 AM
From: Tarcio Alonso Mota
Subject: How do I bypass a Nested Shadow DOM (Shadow Root) in RPA?
We do not natively support Shadow DOM.
However, with the "Run JavaScript" command, you can easily access any element and perform the necessary actions directly using JavaScript.
We have a blog with an example of how to do it.
If it still doesn't work, I need more details to understand your scenario.
------------------------------
Tarcio Alonso Mota
Sr. Software Developer
IBM
Santos
Original Message:
Sent: Thu September 25, 2025 11:47 AM
From: Mike Ortiz
Subject: How do I bypass a Nested Shadow DOM (Shadow Root) in RPA?
Hi,
I know that when dealing with shadow DOM, you need to use the command, "Run JavaScript" however this only works with a single shadow root. When there is a nested shadow root this command no longer works, is there another way on RPA to bypass this nested shadow root?
------------------------------
Mike Ortiz
------------------------------