Web elements
Shadow DOM
Open, nested and closed shadow roots — and what your locator engine can (and cannot) reach.
Practice tasks
- Fill the input inside the open shadow root (Playwright pierces it by default).
- In Selenium use getShadowRoot() and then find the elements.
- Reach the card nested inside another shadow root.
- Explain why the closed shadow root cannot be automated through the DOM.
More Web elements practice
- Text inputs & forms
- Radios, checkboxes & switches
- Dropdowns & autocomplete
- Date pickers
- Sliders & ranges
- File upload & download
- Alerts, modals & popups
- Hover, menus & tooltips
- Mouse & keyboard actions
- Drag & drop
- iFrames & windows
- Tabs & accordion
- Notifications & add/remove
- Scrolling & infinite scroll
- Links, redirects & images
- SVG elements