@@ -103,7 +103,8 @@ def _add_chrome_proxy_extension(
103
103
""" Implementation of https://stackoverflow.com/a/35293284 for
104
104
https://stackoverflow.com/questions/12848327/
105
105
(Run Selenium on a proxy server that requires authentication.) """
106
- if not ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
106
+ arg_join = " " .join (sys .argv )
107
+ if not ("-n" in sys .argv or "-n=" in arg_join or arg_join == "-c" ):
107
108
# Single-threaded
108
109
proxy_helper .create_proxy_zip (proxy_string , proxy_user , proxy_pass )
109
110
else :
@@ -537,7 +538,8 @@ def get_local_driver(
537
538
logging .debug ("\n Warning: Could not make geckodriver"
538
539
" executable: %s" % e )
539
540
elif not is_geckodriver_on_path ():
540
- if not ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
541
+ args = " " .join (sys .argv )
542
+ if not ("-n" in sys .argv or "-n=" in args or args == "-c" ):
541
543
# (Not multithreaded)
542
544
from seleniumbase .console_scripts import sb_install
543
545
sys_args = sys .argv # Save a copy of current sys args
@@ -605,7 +607,8 @@ def get_local_driver(
605
607
logging .debug ("\n Warning: Could not make edgedriver"
606
608
" executable: %s" % e )
607
609
elif not is_edgedriver_on_path ():
608
- if not ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
610
+ args = " " .join (sys .argv )
611
+ if not ("-n" in sys .argv or "-n=" in args or args == "-c" ):
609
612
# (Not multithreaded)
610
613
from seleniumbase .console_scripts import sb_install
611
614
sys_args = sys .argv # Save a copy of current sys args
@@ -658,7 +661,8 @@ def get_local_driver(
658
661
logging .debug ("\n Warning: Could not make chromedriver"
659
662
" executable: %s" % e )
660
663
elif not is_chromedriver_on_path ():
661
- if not ("-n" in sys .argv or "" .join (sys .argv ) == "-c" ):
664
+ args = " " .join (sys .argv )
665
+ if not ("-n" in sys .argv or "-n=" in args or args == "-c" ):
662
666
# (Not multithreaded)
663
667
from seleniumbase .console_scripts import sb_install
664
668
sys_args = sys .argv # Save a copy of current sys args
0 commit comments