Skip to content

Commit 489f136

Browse files
committed
Fix bug with "SB()" and "Driver()" args
1 parent 46e2172 commit 489f136

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

seleniumbase/plugins/driver_manager.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,19 @@ def Driver(
328328
uc_subprocess = True
329329
else:
330330
uc_subprocess = False
331+
if uc_cdp_events or uc_cdp:
332+
undetectable = True
333+
uc_cdp_events = True
334+
elif (
335+
"--uc-cdp-events" in sys_argv
336+
or "--uc_cdp_events" in sys_argv
337+
or "--uc-cdp" in sys_argv
338+
or "--uc_cdp" in sys_argv
339+
):
340+
undetectable = True
341+
uc_cdp_events = True
342+
else:
343+
uc_cdp_events = False
331344
if undetectable and is_mobile:
332345
is_mobile = False
333346
user_agent = None

seleniumbase/plugins/sb_manager.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,19 @@ def SB(
444444
uc_subprocess = True
445445
else:
446446
uc_subprocess = False
447+
if uc_cdp_events or uc_cdp:
448+
undetectable = True
449+
uc_cdp_events = True
450+
elif (
451+
"--uc-cdp-events" in sys_argv
452+
or "--uc_cdp_events" in sys_argv
453+
or "--uc-cdp" in sys_argv
454+
or "--uc_cdp" in sys_argv
455+
):
456+
undetectable = True
457+
uc_cdp_events = True
458+
else:
459+
uc_cdp_events = False
447460
if undetectable and is_mobile:
448461
is_mobile = False
449462
user_agent = None

0 commit comments

Comments
 (0)