-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixedUh oh... Something needs to be fixed
Description
New tabs opened in CDP Mode don't retain special configuration from the first tab
Eg, if calling sb.cdp.open_new_tab(url) when special settings exist (such as changing geolocation), then the new tab doesn't retain those special settings from the first tab.
Once fixed, an example script such as the one below should work:
from seleniumbase import SB
with SB(uc=True, test=True) as sb:
url = "https://www.openstreetmap.org/"
sb.activate_cdp_mode(url, geoloc=(31.774390, 35.222450))
sb.click('a[aria-label="Show My Location"]')
sb.assert_url_contains("31.774390/35.222450")
sb.sleep(5)
sb.cdp.open_new_tab(url)
sb.click('a[aria-label="Show My Location"]')
sb.assert_url_contains("31.774390/35.222450")
sb.sleep(5)Metadata
Metadata
Assignees
Labels
UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixedUh oh... Something needs to be fixed