About Shadow DOM: Elements inside a shadow root are encapsulated. Playwright uses page.locator('custom-el').locator('inner') or >>> combinators. Selenium 4+ uses getShadowRoot(). Cypress uses cy.get('host').shadow().find('inner').

Shadow Host: Login Widget

The elements below are inside a real shadow root attached to #shadow-host-1.

Shadow Host: Custom Counter

A counter component rendered completely inside a shadow root.

Nested Shadow DOM

The outer host contains an inner host, creating two shadow root boundaries.