@@ -95,7 +95,7 @@ def _add_chrome_proxy_extension(
95
95
""" Implementation of https://stackoverflow.com/a/35293284 for
96
96
https://stackoverflow.com/questions/12848327/
97
97
(Run Selenium on a proxy server that requires authentication.) """
98
- if not "" . join (sys .argv ) == "-c" :
98
+ if not ( "-n" in sys . argv or "" . join (sys .argv ) == "-c" ) :
99
99
# Single-threaded
100
100
proxy_helper .create_proxy_zip (proxy_string , proxy_user , proxy_pass )
101
101
else :
@@ -529,7 +529,8 @@ def get_local_driver(
529
529
logging .debug ("\n Warning: Could not make geckodriver"
530
530
" executable: %s" % e )
531
531
elif not is_geckodriver_on_path ():
532
- if not "" .join (sys .argv ) == "-c" : # Skip if multithreaded
532
+ if not ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
533
+ # (Not multithreaded)
533
534
from seleniumbase .console_scripts import sb_install
534
535
sys_args = sys .argv # Save a copy of current sys args
535
536
print ("\n Warning: geckodriver not found!"
@@ -600,7 +601,8 @@ def get_local_driver(
600
601
else :
601
602
return webdriver .Edge ()
602
603
elif browser_name == constants .Browser .SAFARI :
603
- if "" .join (sys .argv ) == "-c" : # Skip if multithreaded
604
+ if ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
605
+ # Skip if multithreaded
604
606
raise Exception ("Can't run Safari tests in multi-threaded mode!" )
605
607
return webdriver .Safari ()
606
608
elif browser_name == constants .Browser .OPERA :
@@ -631,7 +633,8 @@ def get_local_driver(
631
633
logging .debug ("\n Warning: Could not make chromedriver"
632
634
" executable: %s" % e )
633
635
elif not is_chromedriver_on_path ():
634
- if not "" .join (sys .argv ) == "-c" : # Skip if multithreaded
636
+ if not ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
637
+ # (Not multithreaded)
635
638
from seleniumbase .console_scripts import sb_install
636
639
sys_args = sys .argv # Save a copy of current sys args
637
640
print ("\n Warning: chromedriver not found. Installing now:" )
0 commit comments