Skip to content

Commit f622897

Browse files
committed
Fix issue with mobile mode and user agents
1 parent cb1564d commit f622897

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,9 +1314,9 @@ def get_driver(
13141314
binary_location = None
13151315
if (uc_cdp_events or uc_subprocess) and not undetectable:
13161316
undetectable = True
1317-
if is_using_uc(undetectable, browser_name) and mobile_emulator:
1318-
if not user_agent:
1319-
user_agent = constants.Mobile.AGENT
1317+
if mobile_emulator and not user_agent:
1318+
# Use a Pixel user agent by default if not specified
1319+
user_agent = constants.Mobile.AGENT
13201320
if page_load_strategy and page_load_strategy.lower() == "none":
13211321
settings.PAGE_LOAD_STRATEGY = "none"
13221322
proxy_auth = False

0 commit comments

Comments
 (0)