File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -3833,17 +3833,29 @@ def get_local_driver(
38333833 )
38343834 return extend_driver (driver )
38353835 except Exception :
3836+ if is_using_uc (undetectable , browser_name ):
3837+ raise
3838+ # Try again if Chrome didn't launch
38363839 try :
3837- # Try again if Chrome didn't launch
38383840 service = ChromeService (service_args = ["--disable-build-check" ])
38393841 driver = webdriver .Chrome (
38403842 service = service , options = chrome_options
38413843 )
38423844 return extend_driver (driver )
38433845 except Exception :
38443846 pass
3845- if headless :
3847+ if user_data_dir :
3848+ print ("\n Unable to set user_data_dir while starting Chrome!\n " )
3849+ raise
3850+ elif mobile_emulator :
3851+ print ("\n Failed to start Chrome's mobile device emulator!\n " )
3852+ raise
3853+ elif extension_zip or extension_dir :
3854+ print ("\n Unable to load extension while starting Chrome!\n " )
3855+ raise
3856+ elif headless or headless2 or IS_LINUX or proxy_string or use_wire :
38463857 raise
3858+ # Try running without any options (bare bones Chrome launch)
38473859 if LOCAL_CHROMEDRIVER and os .path .exists (LOCAL_CHROMEDRIVER ):
38483860 try :
38493861 make_driver_executable_if_not (LOCAL_CHROMEDRIVER )
You can’t perform that action at this time.
0 commit comments