Accessing Shadow DOM tree with Selenium

javascript, python, selenium, selenium-chromedriver, shadow-dom

Solution

Unfortunately it looks like the webdriver spec does not support this yet.

My snooping uncovered :

http://www.w3.org/TR/webdriver/#switching-to-hosted-shadow-doms

https://groups.google.com/forum/#!msg/selenium-developers/Dad2KZsXNKo/YXH0e6eSHdAJ

Problem

Is it possible to access elements within a Shadow DOM using Selenium/Chrome webdriver? Using the normal element search methods doesn't work, as is to be expected. I've seen references to the switchToSubTree spec on w3c, but couldn't locate any actual docs, examples, etc. Anyone had success with this?

Original source