Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

UC + CDP - Timezone config reset after element not found? #3765

Copy link
Copy link
Closed
@alerodm

Description

@alerodm
Issue body actions

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

UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP ModebugUh oh... Something needs to be fixedUh oh... Something needs to be fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.