Skip to content
Q

query-selector-shadow-dom

use querySelector syntax to search for nodes inside of (nested) shadow roots

by georgegriffFree

#11in UI Libraries
0In stores

Description

query-selector-shadow-dom is a small JavaScript library from the WebdriverIO project that lets you use querySelector-style syntax to find el…

Highlights

  • querySelectorDeep and querySelectorAllDeep
  • Finds elements in nested shadow roots
  • WebdriverIO custom selector plugin
  • Built for test tools, not production code

Ratings & Reviews

No ratings yet

Be the first to rate query-selector-shadow-dom.

People also visit

S

shadow-dom-testing-library

An extension of DOM-testing-library to provide hooks into the shadow dom

UI Libraries
Launch
W

@webcomponents/shadydom

Web Components Polyfills

UI Libraries
Launch
L

@lwc/synthetic-shadow

Shadow DOM polyfill by LWC

UI Libraries
Launch
S

SelectorsHub

xPath plugin to generate, write and verify xpath & cssSelector

Developer Tools
Launch
V

vue-shadow-dom

Shadow dom support for Vue

UI Libraries
Launch
W

@webcomponents/shadycss

ShadowDOM style encapsulation shim

UI Libraries
Launch

query-selector-shadow-dom FAQ

What does query-selector-shadow-dom do?

It finds elements that sit inside one or more nested shadow DOM roots using ordinary querySelector-style selectors.

Which functions does it provide?

querySelectorDeep for the first match, querySelectorAllDeep for all matches, and collectAllElementsDeep to collect every element including shadow DOM content.

Is it meant for production code?

No. The README says production use is not advised. It is for test environments and tools such as WebDriver, Playwright and Puppeteer.

Does it work in every browser?

Not fully. The README says Firefox setValue does not work and Safari support is poor.

Does Puppeteer already support this?

The README says Puppeteer has a built-in shadow DOM selector since version 5.4.0, so the library may not be needed there.

What are the best query-selector-shadow-dom alternatives?

Popular alternatives to query-selector-shadow-dom include shadow-dom-testing-library, @webcomponents/shadydom and @lwc/synthetic-shadow. See all query-selector-shadow-dom alternatives

Developer Stuff

Badges