Accessing Shadow DOM tree with Selenium

后端 未结 9 817
执念已碎
执念已碎 2020-11-28 09:57

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.

9条回答
  •  爱一瞬间的悲伤
    2020-11-28 10:42

    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

提交回复
热议问题