Skip to content

Commit 9e0f98c

Browse files
committed
Fix issue with using multiple extension directories
1 parent 1acc69c commit 9e0f98c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

seleniumbase/core/browser_launcher.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,9 @@ def _set_chrome_options(
21462146
chrome_options.add_extension(abs_path)
21472147
if extension_dir:
21482148
# load-extension input can be a comma-separated list
2149-
abs_path = os.path.abspath(extension_dir)
2149+
abs_path = (
2150+
",".join(os.path.abspath(p) for p in extension_dir.split(","))
2151+
)
21502152
chrome_options = add_chrome_ext_dir(chrome_options, abs_path)
21512153
if (
21522154
page_load_strategy
@@ -4114,7 +4116,9 @@ def get_local_driver(
41144116
edge_options.add_extension(abs_path)
41154117
if extension_dir:
41164118
# load-extension input can be a comma-separated list
4117-
abs_path = os.path.abspath(extension_dir)
4119+
abs_path = (
4120+
",".join(os.path.abspath(p) for p in extension_dir.split(","))
4121+
)
41184122
edge_options = add_chrome_ext_dir(edge_options, abs_path)
41194123
edge_options.add_argument("--disable-infobars")
41204124
edge_options.add_argument("--disable-notifications")

0 commit comments

Comments
 (0)