Skip to content

Commit 3e651f1

Browse files
committed
Prevent setting "user_data_dir" twice when using "uc" mode
1 parent d4df607 commit 3e651f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def _set_chrome_options(
498498
chrome_options.add_argument("--guest")
499499
else:
500500
pass
501-
if user_data_dir:
501+
if user_data_dir and not undetectable:
502502
abs_path = os.path.abspath(user_data_dir)
503503
chrome_options.add_argument("user-data-dir=%s" % abs_path)
504504
if extension_zip:
@@ -2058,7 +2058,7 @@ def get_local_driver(
20582058
edge_options.add_experimental_option(
20592059
"mobileEmulation", emulator_settings
20602060
)
2061-
if user_data_dir:
2061+
if user_data_dir and not undetectable:
20622062
abs_path = os.path.abspath(user_data_dir)
20632063
edge_options.add_argument("user-data-dir=%s" % abs_path)
20642064
if extension_zip:

0 commit comments

Comments
 (0)