Skip to content

Commit d4355ed

Browse files
committed
Fix issue that occurs if a driver path contains spaces
1 parent 3d22534 commit d4355ed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def get_uc_driver_version():
158158
if os.path.exists(LOCAL_UC_DRIVER):
159159
try:
160160
output = subprocess.check_output(
161-
"%s --version" % LOCAL_UC_DRIVER, shell=True
161+
'"%s" --version' % LOCAL_UC_DRIVER, shell=True
162162
)
163163
if IS_WINDOWS:
164164
output = output.decode("latin1")
@@ -2276,7 +2276,7 @@ def get_local_driver(
22762276
if os.path.exists(LOCAL_EDGEDRIVER):
22772277
try:
22782278
output = subprocess.check_output(
2279-
"%s --version" % LOCAL_EDGEDRIVER, shell=True
2279+
'"%s" --version' % LOCAL_EDGEDRIVER, shell=True
22802280
)
22812281
if IS_WINDOWS:
22822282
output = output.decode("latin1")
@@ -2912,7 +2912,7 @@ def get_local_driver(
29122912
if os.path.exists(LOCAL_CHROMEDRIVER):
29132913
try:
29142914
output = subprocess.check_output(
2915-
"%s --version" % LOCAL_CHROMEDRIVER, shell=True
2915+
'"%s" --version' % LOCAL_CHROMEDRIVER, shell=True
29162916
)
29172917
if IS_WINDOWS:
29182918
output = output.decode("latin1")
@@ -2926,7 +2926,7 @@ def get_local_driver(
29262926
elif path_chromedriver:
29272927
try:
29282928
output = subprocess.check_output(
2929-
"%s --version" % path_chromedriver, shell=True
2929+
'"%s" --version' % path_chromedriver, shell=True
29302930
)
29312931
if IS_WINDOWS:
29322932
output = output.decode("latin1")

0 commit comments

Comments
 (0)