Skip to content

Commit

Permalink
[py] allow --browser-binary and --browser-args to be used with Chromi…
Browse files Browse the repository at this point in the history
…umEdge
  • Loading branch information
lmtierney committed Aug 2, 2019
1 parent 139ca6c commit cbd9435
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions py/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def fin():
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
Expand All @@ -136,11 +136,11 @@ 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:
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:
Expand Down

0 comments on commit cbd9435

Please sign in to comment.