Skip to content

Commit 310e03d

Browse files
committed
Update handling of msedgedriver test runs
1 parent ec741c2 commit 310e03d

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -510,20 +510,14 @@ def get_local_driver(
510510
elif browser_name == constants.Browser.EDGE:
511511
if LOCAL_EDGEDRIVER and os.path.exists(LOCAL_EDGEDRIVER):
512512
make_driver_executable_if_not(LOCAL_EDGEDRIVER)
513-
try:
514-
# The new Microsoft Edge browser is based on Chrome
515-
chrome_options = _set_chrome_options(
516-
downloads_path, headless,
517-
proxy_string, proxy_auth, proxy_user, proxy_pass,
518-
user_agent, disable_csp, enable_sync, user_data_dir,
519-
extension_zip, extension_dir)
520-
return webdriver.Chrome(executable_path=LOCAL_EDGEDRIVER,
521-
options=chrome_options)
522-
except Exception:
523-
try:
524-
return webdriver.Chrome(executable_path=LOCAL_EDGEDRIVER)
525-
except Exception:
526-
return webdriver.Edge(executable_path=LOCAL_EDGEDRIVER)
513+
# The new Microsoft Edge browser is based on Chromium
514+
chrome_options = _set_chrome_options(
515+
downloads_path, headless,
516+
proxy_string, proxy_auth, proxy_user, proxy_pass,
517+
user_agent, disable_csp, enable_sync, user_data_dir,
518+
extension_zip, extension_dir)
519+
return webdriver.Chrome(executable_path=LOCAL_EDGEDRIVER,
520+
options=chrome_options)
527521
else:
528522
return webdriver.Edge()
529523
elif browser_name == constants.Browser.SAFARI:

0 commit comments

Comments
 (0)