MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / test_shadow_root

Method test_shadow_root

examples/shadow_root_test.py:8–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6
7class ShadowRootTest(BaseCase):
8 def test_shadow_root(self):
9 if self.recorder_mode or not self.is_chromium():
10 self.goto_if_not_url("about:blank")
11 print("\n Unsupported mode for this test.")
12 self.skip("Unsupported mode for this test.")
13 self.goto("https://seleniumbase.io/other/shadow_dom")
14 print("")
15 self.click("button.tab_1")
16 print(self.get_text("fancy-tabs::shadow #panels"))
17 self.assert_exact_text("Content Panel 1", "fancy-tabs::shadow #panels")
18 self.click("button.tab_2")
19 print(self.get_text("fancy-tabs::shadow #panels"))
20 self.assert_exact_text("Content Panel 2", "fancy-tabs::shadow #panels")
21 self.click("button.tab_3")
22 print(self.get_text("fancy-tabs::shadow #panels"))
23 self.assert_exact_text("Content Panel 3", "fancy-tabs::shadow #panels")

Callers

nothing calls this directly

Calls 7

is_chromiumMethod · 0.80
skipMethod · 0.80
goto_if_not_urlMethod · 0.45
gotoMethod · 0.45
clickMethod · 0.45
get_textMethod · 0.45
assert_exact_textMethod · 0.45

Tested by

no test coverage detected