~/talk

Talk: Automating Shadow DOM Web Components with WebDriver

Talkat Testing Stage 2023 · on Friday, 2023-04-21· [web-platform, testing]
slides:none on file

Shows how a reusable custom element <unique-signup-form> is built (attributes, HTML templates and slots), and how tests automate it with Java + Selenium 4, WebDriverManager and JUnit using a GitHub demo repo. Uses open Shadow DOM so WebDriver’s getShadowRoot can return a root; closed shadow throws an exception. Demonstrates nested Shadow DOMs (up to seven levels encountered), asserts styles via getCssValue, and controls closed components (video, date picker, CKEditor) by calling their JS API with executeScript, which reliably works when Shadow access is blocked.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:33What are Shadow DOM and Web Components
  3. 15:21Building custom web components
  4. 28:42Automating regular forms
  5. 34:26Automating Shadow DOM components
  6. 38:46Nested Shadow DOM automation
  7. 40:51Automating standard HTML5 controls
  8. 43:23JavaScript API for complex controls
  9. 44:34Summary and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.