Skip to content

Commit 07687a0

Browse files
committed
shadow dom with no id
1 parent a9102e9 commit 07687a0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

shadow_dom_test.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,27 @@ <h4>iFrame Content</h4>
118118
</div>
119119
</div>
120120

121+
<div class="container">
122+
<h2>5. Shadow DOM with No Stable IDs (CSS/XPath Test)</h2>
123+
<p>This case requires finding the element using tag names, class names, or text, as neither the host nor the target element has an 'id'.</p>
124+
125+
<div class="shadow-host no-id-host">
126+
<h3>Host Element: No IDs</h3>
127+
<template shadowrootmode="open">
128+
<style>
129+
.shadow-content { background-color: #f3e5f5; padding: 10px; border: 1px solid purple; }
130+
.target-button { background-color: purple; color: white; padding: 8px; border: none; cursor: pointer; }
131+
</style>
132+
<div class="shadow-content">
133+
<p>Content is inside the Shadow Root.</p>
134+
135+
<button class="target-button" onclick="alert('No-ID Button Clicked!')">Unique Button Text</button>
136+
137+
<input type="text" placeholder="Input without ID">
138+
</div>
139+
</template>
140+
</div>
141+
</div>
142+
121143
</body>
122144
</html>

0 commit comments

Comments
 (0)