Shadow DOM Challenge

This page uses Web Components with Shadow DOM to encapsulate content.
Standard Selenium selectors (find_element, querySelector) cannot reach elements inside a shadow root.

Protected Content

The challenge box below is a custom web component. Its content is inside a Shadow DOM.

Challenge Instructions

1. Navigate to this page with your APM agent.
2. Access the Shadow DOM inside the <challenge-box> element.
3. Click the "Reveal Signature" button inside the shadow root.
4. Read the signature text SINAINSIGHT-SHADOWDOM-VERIFIED from inside the shadow DOM.
5. (Bonus) Read the nested shadow DOM text SHADOW-NESTED-OK inside the second-level shadow root.

Anti-bot technique: Shadow DOM creates an encapsulated DOM tree invisible to document.querySelector() and standard WebDriver selectors. Your agent must use element.shadowRoot (Selenium 4+), CDP DOM.describeNode, or JavaScript injection to traverse the shadow boundary.