Closed
Description
Hey! So I have the python snippet below which I was using to test the timezone override.
with SB(uc=True, test=False, locale_code="en-US") as sb:
sb.activate_cdp_mode("https://ipwhois.io/", timezone="America/Chicago")
print(sb.cdp.evaluate("return Intl.DateTimeFormat().resolvedOptions().timeZone;"))
try:
print(sb.cdp.find_element("div[class='foo']").text) # non-existent element
except Exception:
pass
print(sb.cdp.evaluate("return Intl.DateTimeFormat().resolvedOptions().timeZone;"))
When the element is found I have no issues:
America/Chicago
IP Geolocation API
America/Chicago
However, when the element isn't found the timezone override seems to have been reset?
> uv run sb_timezone.py
America/Chicago
America/Buenos_Aires
Currently on seleniumbase==4.38.2 and Chrome 136.
Am I missing any steps? Thanks
Metadata
Metadata
Assignees
Labels
Undetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUh oh... Something needs to be fixedUh oh... Something needs to be fixed