[py] allow --browser-binary and --browser-args to be used with ChromiumEdge
Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/SeleniumHQ/selenium
Cr-Mirrored-Commit: cbd9435bbaaf3e29c1dead61efe2df7749eee6bd
diff --git a/conftest.py b/conftest.py
index f1b90e7..f3adcf4 100644
--- a/conftest.py
+++ b/conftest.py
@@ -119,7 +119,7 @@
if driver_class == 'WebKitGTK':
options = get_options(driver_class, request.config)
if driver_class == 'ChromiumEdge':
- options = get_options('Edge', request.config)
+ options = get_options(driver_class, request.config)
kwargs.update({'is_legacy': False})
if driver_path is not None:
kwargs['executable_path'] = driver_path
@@ -136,11 +136,11 @@
browser_args = config.option.args
options = None
- if driver_class == 'Edge':
- return getattr(webdriver, '{}Options'.format(driver_class))(False)
-
if browser_path or browser_args:
- options = getattr(webdriver, '{}Options'.format(driver_class))()
+ if driver_class == 'ChromiumEdge':
+ options = getattr(webdriver, 'EdgeOptions')(False)
+ else:
+ options = getattr(webdriver, '{}Options'.format(driver_class))()
if driver_class == 'WebKitGTK':
options.overlay_scrollbars_enabled = False
if browser_path is not None: