2

I'm trying to work with this dom with c# WebDriver. My chromedriver uses v38. I can't use input#frameworkInput as everything under #shadow-root is not seen. So I tried

IWebElement ele = (IWebElement)((IJavaScriptExecutor)Driver).ExecuteScript("return arguments[0].shadowRoot", element);

but this is just bringing back the exception shadowRoot not found. I've tried some suggestions here, but they don't seem to work. Any pointers?

This is the dom

SlightlyKosumi
  • 701
  • 2
  • 8
  • 24

1 Answers1

0

I found the answer to my own question

element1
(shadowdom)
element2 
(shadowdom)
element3

I was thinking that I could access arguments[0].shadowRoot directly from the dom Infact I have to get element1, query it for a shadowRoot, get element2, query it for a shadowRoot, then I can find element3. It wasn't what I expected, most probably I failed to understand previous posts on the subject.(?) Most helpful answer was selenium webdriver (chromedriver) and accessing shadow dom

SlightlyKosumi
  • 701
  • 2
  • 8
  • 24