Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion py/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ py_test_suite(
]),
args = [
"--instafail",
"--driver=Edge",
"--driver=edge",
],
tags = [
"no-sandbox",
Expand Down
1 change: 0 additions & 1 deletion py/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ def get_options(driver_class, config):

if driver_class == 'ChromiumEdge':
options = getattr(webdriver, 'EdgeOptions')()
options.use_chromium = True

if browser_path or browser_args:
if not options:
Expand Down
21 changes: 3 additions & 18 deletions py/selenium/webdriver/edge/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,8 @@ class Options(ChromiumOptions):

def __init__(self):
super(Options, self).__init__()
self._use_chromium = True
self._use_webview = False

@property
def use_chromium(self) -> bool:
return self._use_chromium

@use_chromium.setter
def use_chromium(self, value: bool):
self._use_chromium = bool(value)

@property
def use_webview(self) -> bool:
return self._use_webview
Expand All @@ -48,16 +39,10 @@ def to_capabilities(self) -> dict:
Creates a capabilities with all the options that have been set and
:Returns: A dictionary with everything
"""
caps = self._caps

if self._use_chromium:
caps = super(Options, self).to_capabilities()
if self._use_webview:
caps['browserName'] = 'webview2'
else:
caps['platform'] = 'windows'
caps = super(Options, self).to_capabilities()
if self._use_webview:
caps['browserName'] = 'webview2'

caps['ms:edgeChromium'] = self._use_chromium
return caps

@property
Expand Down
3 changes: 1 addition & 2 deletions py/selenium/webdriver/edge/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
class WebDriver(ChromiumDriver):
"""
Controls the Microsoft Edge driver and allows you to drive the browser.
You will need to download either the MicrosoftWebDriver (Legacy)
or MSEdgeDriver (Chromium) executable from
You will need to download the MSEdgeDriver (Chromium) executable from
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
"""

Expand Down
8 changes: 0 additions & 8 deletions py/test/unit/selenium/webdriver/edge/edge_options_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,8 @@ def test_is_a_baseoptions(options):
assert isinstance(options, BaseOptions)


def test_use_chromium():
options = Options()
options.use_chromium = True
caps = options.to_capabilities()
assert caps['ms:edgeChromium'] is True


def test_use_webview():
options = Options()
options.use_chromium = True
options.use_webview = True
caps = options.to_capabilities()
assert caps['browserName'] == "webview2"