Is it possible to access nested Shadow DOM objects using selenium with Firefox. In my code I am using
WebElement ele = (WebElement) ((JavascriptExecutor) driver)
.executeScript("return arguments[0].shadowRoot",element);
return ele;
It works fine with Chrome and I can access and work with Nested Shadow DOM objects. The same code fails for FireFox (89 and one before that). Does anyone has any solution for that. I read something here Accessing Shadow DOM tree with Selenium but it only works for Chrome and not Firefox.