Skip to content

Commit 876b462

Browse files
committed
Add example of changing settings in realtime
1 parent de8b6ba commit 876b462

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/cdp_mode/raw_timezone_sb.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""An example of changing settings during CDP Mode"""
2+
from seleniumbase import SB
3+
4+
with SB(uc=True, test=True, pls="eager") as sb:
5+
url = "https://www.randymajors.org/what-time-zone-am-i-in"
6+
sb.activate_cdp_mode(url, tzone="Asia/Kolkata", geoloc=(26.863, 80.94))
7+
sb.remove_elements("#right-sidebar")
8+
sb.remove_elements('[id*="Footer"]')
9+
sb.sleep(5)
10+
sb.cdp.open(url, tzone="Asia/Tokyo", geoloc=(35.050681, 136.844728))
11+
sb.remove_elements("#right-sidebar")
12+
sb.remove_elements('[id*="Footer"]')
13+
sb.sleep(5)

0 commit comments

Comments
 (0)