Work with shadowroot
See original GitHub issueCurrently this doesn’t work:
assert.dom(find('#internal').shadowRoot).hasText('template block text');
And doesn’t look great. I can submit a PR to make it work, but would love something more ergonomic.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Using shadow DOM - Web Components | MDN
Shadow DOM allows hidden DOM trees to be attached to elements in the regular DOM tree — this shadow DOM tree starts with...
Read more >5. Working with the Shadow DOM - Modern JavaScript [Book]
The shadow root is the root node for the shadow DOM branch. Shadow root child nodes are not returned by DOM queries even...
Read more >What is a tip to work with shadow-root elements?
There's a useful tip to locate any kind of element which is under a shadow DOM with a CSS locator. In order to...
Read more >Working with Shadow DOM Elements using Webdriver
If you look at the DOM structure, every element that has ShadowDOM also has a shadowRoot property which describes the underlying elements.
Read more >How to interact with the elements within #shadow-root (open ...
Problem: Selenium does not provide explicit support to work with Shadow DOM elements, as they are not in the current dom. That's the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any chance we could re-open this? It’s pretty hard to test anything built with the Web Component standard when
shadowRoot
returnsnull
.adding something like this IMHO seems out-of-scope for this plugin and would make the implementation somewhat more complicated, which I would like to avoid, so I’ll go ahead and close this. if
shadowRoot
at some point becomes more mainstream in Ember projects we can revisit this 😃