We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbcac52 commit d107560Copy full SHA for d107560
examples/cdp_mode/raw_tab_switching.py
@@ -0,0 +1,15 @@
1
+from seleniumbase import SB
2
+
3
+with SB(uc=True) as sb:
4
+ sb.activate_cdp_mode()
5
+ sb.open("data:text/html,<h1>Page A</h1>")
6
+ sb.assert_text("Page A")
7
+ sb.open_new_tab()
8
+ sb.open("data:text/html,<h1>Page B</h1>")
9
+ sb.assert_text("Page B")
10
+ sb.switch_to_tab(0)
11
12
+ sb.assert_text_not_visible("Page B")
13
+ sb.switch_to_tab(1)
14
15
+ sb.assert_text_not_visible("Page A")
0 commit comments