Skip to content

Commit 87e3833

Browse files
[python] Remove Edge legacy options. (#9908)
Co-authored-by: David Burns <[email protected]>
1 parent 81cf027 commit 87e3833

File tree

5 files changed

+5
-30
lines changed

5 files changed

+5
-30
lines changed

py/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ py_test_suite(
308308
]),
309309
args = [
310310
"--instafail",
311-
"--driver=Edge",
311+
"--driver=edge",
312312
],
313313
tags = [
314314
"no-sandbox",

py/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def get_options(driver_class, config):
146146

147147
if driver_class == 'ChromiumEdge':
148148
options = getattr(webdriver, 'EdgeOptions')()
149-
options.use_chromium = True
150149

151150
if browser_path or browser_args:
152151
if not options:

py/selenium/webdriver/edge/options.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,8 @@ class Options(ChromiumOptions):
2424

2525
def __init__(self):
2626
super(Options, self).__init__()
27-
self._use_chromium = True
2827
self._use_webview = False
2928

30-
@property
31-
def use_chromium(self) -> bool:
32-
return self._use_chromium
33-
34-
@use_chromium.setter
35-
def use_chromium(self, value: bool):
36-
self._use_chromium = bool(value)
37-
3829
@property
3930
def use_webview(self) -> bool:
4031
return self._use_webview
@@ -48,16 +39,10 @@ def to_capabilities(self) -> dict:
4839
Creates a capabilities with all the options that have been set and
4940
:Returns: A dictionary with everything
5041
"""
51-
caps = self._caps
52-
53-
if self._use_chromium:
54-
caps = super(Options, self).to_capabilities()
55-
if self._use_webview:
56-
caps['browserName'] = 'webview2'
57-
else:
58-
caps['platform'] = 'windows'
42+
caps = super(Options, self).to_capabilities()
43+
if self._use_webview:
44+
caps['browserName'] = 'webview2'
5945

60-
caps['ms:edgeChromium'] = self._use_chromium
6146
return caps
6247

6348
@property

py/selenium/webdriver/edge/webdriver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
class WebDriver(ChromiumDriver):
2929
"""
3030
Controls the Microsoft Edge driver and allows you to drive the browser.
31-
You will need to download either the MicrosoftWebDriver (Legacy)
32-
or MSEdgeDriver (Chromium) executable from
31+
You will need to download the MSEdgeDriver (Chromium) executable from
3332
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
3433
"""
3534

py/test/unit/selenium/webdriver/edge/edge_options_tests.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,8 @@ def test_is_a_baseoptions(options):
5959
assert isinstance(options, BaseOptions)
6060

6161

62-
def test_use_chromium():
63-
options = Options()
64-
options.use_chromium = True
65-
caps = options.to_capabilities()
66-
assert caps['ms:edgeChromium'] is True
67-
68-
6962
def test_use_webview():
7063
options = Options()
71-
options.use_chromium = True
7264
options.use_webview = True
7365
caps = options.to_capabilities()
7466
assert caps['browserName'] == "webview2"

0 commit comments

Comments
 (0)