Skip to content

Commit 66c08fe

Browse files
committed
[py] Run Edge tests on RBE
1 parent cb98925 commit 66c08fe

File tree

13 files changed

+23
-19
lines changed

13 files changed

+23
-19
lines changed

py/conftest.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"remote",
3737
"safari",
3838
"webkitgtk",
39-
"chromiumedge",
4039
"wpewebkit",
4140
)
4241

@@ -169,16 +168,13 @@ def get_options(driver_class, config):
169168
headless = bool(config.option.headless)
170169
options = None
171170

172-
if driver_class == "ChromiumEdge":
173-
options = getattr(webdriver, "EdgeOptions")()
174-
175171
if browser_path or browser_args:
176172
if not options:
177173
options = getattr(webdriver, f"{driver_class}Options")()
178174
if driver_class == "WebKitGTK":
179175
options.overlay_scrollbars_enabled = False
180176
if browser_path is not None:
181-
options.binary_location = browser_path
177+
options.binary_location = browser_path.strip("'")
182178
if browser_args is not None:
183179
for arg in browser_args.split():
184180
options.add_argument(arg)

py/private/browsers.bzl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ chrome_args = select({
2828
}) + headless_args
2929

3030
edge_args = select({
31+
"@selenium//common:use_pinned_linux_edge": [
32+
"--driver-binary=$(location @linux_edgedriver//:msedgedriver)",
33+
"--browser-binary=$(location @linux_edge//:opt/microsoft/msedge/microsoft-edge)",
34+
"--browser-args=--disable-dev-shm-usage",
35+
"--browser-args=--no-sandbox",
36+
],
3137
"@selenium//common:use_pinned_macos_edge": [
3238
"--driver-binary=$(location @mac_edgedriver//:msedgedriver)",
3339
"--browser-binary='$(location @mac_edge//:Edge.app)/Contents/MacOS/Microsoft Edge'",
@@ -56,7 +62,7 @@ BROWSERS = {
5662
"edge": {
5763
"args": ["--driver=edge"] + edge_args,
5864
"data": edge_data,
59-
"tags": COMMON_TAGS + ["edge", "skip-remote"],
65+
"tags": COMMON_TAGS + ["edge"],
6066
},
6167
"firefox": {
6268
"args": ["--driver=firefox"] + firefox_args,

py/pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ log_cli = True
55
trio_mode = true
66
markers =
77
xfail_chrome: Tests expected to fail in Chrome
8-
xfail_chromiumedge: Tests expected to fail in Chromium Edge
8+
xfail_edge: Tests expected to fail in Edge
99
xfail_firefox: Tests expected to fail in Firefox
1010
xfail_ie: Tests expected to fail in IE
1111
xfail_remote: Tests expected to fail with Remote webdriver

py/selenium/webdriver/remote/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ def _get_cdp_details(self):
10461046
_firefox = False
10471047
if self.caps.get("browserName") == "chrome":
10481048
debugger_address = self.caps.get("goog:chromeOptions").get("debuggerAddress")
1049-
elif self.caps.get("browserName") == "msedge":
1049+
elif self.caps.get("browserName") == "MicrosoftEdge":
10501050
debugger_address = self.caps.get("ms:edgeOptions").get("debuggerAddress")
10511051
else:
10521052
_firefox = True

py/test/selenium/webdriver/common/alerts_tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def test_setting_the_value_of_an_alert_throws(driver, pages):
141141
@pytest.mark.xfail_chrome(
142142
condition=sys.platform == "darwin", reason="https://bugs.chromium.org/p/chromedriver/issues/detail?id=26", run=False
143143
)
144-
@pytest.mark.xfail_chromiumedge(
144+
@pytest.mark.xfail_edge(
145145
condition=sys.platform == "darwin", reason="https://bugs.chromium.org/p/chromedriver/issues/detail?id=26", run=False
146146
)
147147
def test_alert_should_not_allow_additional_commands_if_dimissed(driver, pages):
@@ -250,7 +250,7 @@ def test_should_handle_alert_on_page_load_using_get(driver, pages):
250250

251251

252252
@pytest.mark.xfail_chrome(reason="Non W3C conformant")
253-
@pytest.mark.xfail_chromiumedge(reason="Non W3C conformant")
253+
@pytest.mark.xfail_edge(reason="Non W3C conformant")
254254
def test_should_handle_alert_on_page_before_unload(driver, pages):
255255
pages.load("pageWithOnBeforeUnloadMessage.html")
256256

@@ -293,6 +293,7 @@ def test_alert_should_not_allow_additional_commands_if_dismissed(driver, pages):
293293
@pytest.mark.xfail_firefox(reason="https://bugzilla.mozilla.org/show_bug.cgi?id=1279211")
294294
@pytest.mark.xfail_remote(reason="https://bugzilla.mozilla.org/show_bug.cgi?id=1279211")
295295
@pytest.mark.xfail_chrome
296+
@pytest.mark.xfail_edge
296297
def test_unexpected_alert_present_exception_contains_alert_text(driver, pages):
297298
pages.load("alerts.html")
298299
driver.find_element(by=By.ID, value="alert").click()

py/test/selenium/webdriver/common/driver_element_finding_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_finding_alink_by_xpath_using_contains_keyword_should_work(driver, pages
360360

361361

362362
# @pytest.mark.xfail_chrome(raises=InvalidSelectorException)
363-
# @pytest.mark.xfail_chromiumedge(raises=InvalidSelectorException)
363+
# @pytest.mark.xfail_edge(raises=InvalidSelectorException)
364364
# @pytest.mark.xfail_firefox(raises=InvalidSelectorException)
365365
# @pytest.mark.xfail_remote(raises=InvalidSelectorException)
366366
# @pytest.mark.xfail_safari(raises=NoSuchElementException)

py/test/selenium/webdriver/common/element_attribute_tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ def test_should_return_true_for_present_boolean_attributes(driver, pages):
270270

271271

272272
@pytest.mark.xfail_chrome
273+
@pytest.mark.xfail_edge
273274
@pytest.mark.xfail_firefox
274275
@pytest.mark.xfail_safari
275276
@pytest.mark.xfail_remote
@@ -280,6 +281,7 @@ def test_should_get_unicode_chars_from_attribute(driver, pages):
280281

281282

282283
@pytest.mark.xfail_chrome
284+
@pytest.mark.xfail_edge
283285
@pytest.mark.xfail_firefox
284286
@pytest.mark.xfail_safari
285287
@pytest.mark.xfail_remote

py/test/selenium/webdriver/common/frame_switching_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def test_should_continue_to_refer_to_the_same_frame_once_it_has_been_selected(dr
230230
@pytest.mark.xfail_remote(raises=WebDriverException, reason="https://github.com/mozilla/geckodriver/issues/610")
231231
@pytest.mark.xfail_safari
232232
@pytest.mark.xfail_chrome
233+
@pytest.mark.xfail_edge
233234
def test_should_focus_on_the_replacement_when_aframe_follows_alink_to_a_top_targeted_page(driver, pages):
234235
pages.load("frameset.html")
235236
driver.switch_to.frame(0)
@@ -383,7 +384,7 @@ def test_should_be_able_to_switch_to_the_top_if_the_frame_is_deleted_from_under_
383384

384385

385386
# @pytest.mark.xfail_chrome(raises=NoSuchElementException)
386-
# @pytest.mark.xfail_chromiumedge(raises=NoSuchElementException)
387+
# @pytest.mark.xfail_edge(raises=NoSuchElementException)
387388
# @pytest.mark.xfail_firefox(raises=WebDriverException,
388389
# reason='https://github.com/mozilla/geckodriver/issues/614')
389390
# @pytest.mark.xfail_remote(raises=WebDriverException,

py/test/selenium/webdriver/common/page_loading_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_should_wait_for_document_to_be_loaded(driver, pages):
121121
# @pytest.mark.xfail_firefox(run=False)
122122
# @pytest.mark.xfail_remote(run=False)
123123
# @pytest.mark.xfail_chrome(run=False)
124-
# @pytest.mark.xfail_chromiumedge(run=False)
124+
# @pytest.mark.xfail_edge(run=False)
125125
# def test_should_not_hang_if_document_open_call_is_never_followed_by_document_close_call(driver, pages):
126126
# pages.load("document_write_in_onload.html")
127127
# driver.find_element(By.XPATH, "//body")

py/test/selenium/webdriver/common/position_and_size_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_should_scroll_page_and_get_coordinates_of_an_element_that_is_out_of_vie
6363

6464

6565
@pytest.mark.xfail_chrome
66-
@pytest.mark.xfail_chromiumedge
66+
@pytest.mark.xfail_edge
6767
@pytest.mark.xfail_firefox
6868
@pytest.mark.xfail_remote
6969
@pytest.mark.xfail_safari
@@ -76,7 +76,7 @@ def test_should_get_coordinates_of_an_element_in_aframe(driver, pages):
7676

7777

7878
@pytest.mark.xfail_chrome
79-
@pytest.mark.xfail_chromiumedge
79+
@pytest.mark.xfail_edge
8080
@pytest.mark.xfail_firefox
8181
@pytest.mark.xfail_remote
8282
@pytest.mark.xfail_safari

0 commit comments

Comments
 (0)