Skip to content

Commit d67d6d7

Browse files
committed
Add a simple Shadow DOM / Shadow Root test
1 parent 642957d commit d67d6d7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

examples/shadow_root_test.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from seleniumbase import BaseCase
2+
3+
4+
class ShadowRootTest(BaseCase):
5+
def test_shadow_root(self):
6+
self.open("https://react-shadow.herokuapp.com/Patagonia")
7+
self.click("section.weather::shadow div::shadow button")
8+
self.assert_element('section.weather::shadow img[alt="Patagonia"]')
9+
weather = self.get_text("section.weather::shadow h1")
10+
self.post_message(weather)
11+
self.click('section.weather::shadow a[href="/Kyoto"]')
12+
self.assert_element('section.weather::shadow img[alt="Kyoto"]')
13+
weather = self.get_text("section.weather::shadow h1")
14+
self.post_message(weather)

0 commit comments

Comments
 (0)