Skip to content

Commit 0d270fe

Browse files
committed
Fix issue with loading a Chrome extension dir on Windows
1 parent 4e5f3fe commit 0d270fe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,13 @@ def add_chrome_ext_dir(chrome_options, dir_path):
278278
if arg.startswith("--load-extension="):
279279
option_exists = True
280280
chrome_options.arguments.remove(arg)
281-
chrome_options.add_argument("%s,%s" % (arg, dir_path))
281+
chrome_options.add_argument(
282+
"%s,%s" % (arg, os.path.realpath(dir_path))
283+
)
282284
if not option_exists:
283-
chrome_options.add_argument("--load-extension=%s" % dir_path)
285+
chrome_options.add_argument(
286+
"--load-extension=%s" % os.path.realpath(dir_path)
287+
)
284288
return chrome_options
285289

286290

0 commit comments

Comments
 (0)