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(
3833
3833
)
3834
3834
return extend_driver (driver )
3835
3835
except Exception :
3836
+ if is_using_uc (undetectable , browser_name ):
3837
+ raise
3838
+ # Try again if Chrome didn't launch
3836
3839
try :
3837
- # Try again if Chrome didn't launch
3838
3840
service = ChromeService (service_args = ["--disable-build-check" ])
3839
3841
driver = webdriver .Chrome (
3840
3842
service = service , options = chrome_options
3841
3843
)
3842
3844
return extend_driver (driver )
3843
3845
except Exception :
3844
3846
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 :
3846
3857
raise
3858
+ # Try running without any options (bare bones Chrome launch)
3847
3859
if LOCAL_CHROMEDRIVER and os .path .exists (LOCAL_CHROMEDRIVER ):
3848
3860
try :
3849
3861
make_driver_executable_if_not (LOCAL_CHROMEDRIVER )
You can’t perform that action at this time.
0 commit comments