[py] Add support for the new MicrosoftEdge (#7459)
Extracting Chromium from Chrome module. Have both Chrome and Edge
inherited from Chromium module. Add is_legacy parameter to launch
the new MicrosoftEdge.
Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/SeleniumHQ/selenium
Cr-Mirrored-Commit: 139ca6cddf95feb4446931c75f2bb7ce9ff83496
diff --git a/conftest.py b/conftest.py
index 7ba634a..f1b90e7 100644
--- a/conftest.py
+++ b/conftest.py
@@ -44,6 +44,7 @@
'Remote',
'Safari',
'WebKitGTK',
+ 'ChromiumEdge',
)
@@ -117,6 +118,9 @@
options = get_options('Firefox', request.config)
if driver_class == 'WebKitGTK':
options = get_options(driver_class, request.config)
+ if driver_class == 'ChromiumEdge':
+ options = get_options('Edge', request.config)
+ kwargs.update({'is_legacy': False})
if driver_path is not None:
kwargs['executable_path'] = driver_path
if options is not None:
@@ -131,6 +135,10 @@
browser_path = config.option.binary
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 == 'WebKitGTK':