question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Work with shadowroot

See original GitHub issue

Currently 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:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
amark-axcientcommented, Apr 7, 2021

Any chance we could re-open this? It’s pretty hard to test anything built with the Web Component standard when shadowRoot returns null.

1reaction
Turbo87commented, Feb 2, 2020

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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found