[py] allow --browser-binary and --browser-args to be used with ChromiumEdge
@@ -119,7 +119,7 @@ def driver(request):
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,10 +136,10 @@ def get_options(driver_class, config):
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:
+ 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
