Skip to content

Commit 80591c2

Browse files
[py] Set known xfails for remote tests
1 parent 42d0f75 commit 80591c2

File tree

6 files changed

+13
-29
lines changed

6 files changed

+13
-29
lines changed

py/test/selenium/webdriver/common/api_example_tests.py

-16
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,6 @@ def testFindElementByTagNameWithinElement(driver, pages):
122122
assert len(elems) == 1
123123

124124

125-
@pytest.mark.xfail_firefox(
126-
reason="W3C implementations can't switch to a window by name",
127-
raises=TimeoutException,
128-
run=False)
129-
def testSwitchToWindow(driver, pages):
130-
title_1 = "XHTML Test Page"
131-
title_2 = "We Arrive Here"
132-
switch_to_window_timeout = 5
133-
wait = WebDriverWait(driver, switch_to_window_timeout, ignored_exceptions=[NoSuchWindowException])
134-
pages.load("xhtmlTest.html")
135-
driver.find_element(By.LINK_TEXT, "Open new window").click()
136-
assert title_1 == driver.title
137-
wait.until(lambda dr: dr.switch_to.window("result") is None)
138-
assert title_2 == driver.title
139-
140-
141125
def testSwitchFrameByName(driver, pages):
142126
pages.load("frameset.html")
143127
driver.switch_to.frame(driver.find_element(By.NAME, "third"))

py/test/selenium/webdriver/common/bidi_tests.py

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
@pytest.mark.xfail_safari
2525
@pytest.mark.xfail_firefox(reason="This is not in release firefox yet")
26+
@pytest.mark.xfail_remote
2627
async def test_check_console_messages(driver, pages):
2728
pages.load("javascriptPage.html")
2829
from selenium.webdriver.common.bidi.console import Console
@@ -33,6 +34,7 @@ async def test_check_console_messages(driver, pages):
3334

3435
@pytest.mark.xfail_safari
3536
@pytest.mark.xfail_firefox(reason="This is not in release firefox yet")
37+
@pytest.mark.xfail_remote
3638
async def test_check_error_console_messages(driver, pages):
3739
pages.load("javascriptPage.html")
3840
from selenium.webdriver.common.bidi.console import Console
@@ -44,6 +46,7 @@ async def test_check_error_console_messages(driver, pages):
4446

4547
@pytest.mark.xfail_firefox
4648
@pytest.mark.xfail_safari
49+
@pytest.mark.xfail_remote
4750
async def test_collect_js_exceptions(driver, pages):
4851
pages.load("javascriptPage.html")
4952
async with driver.add_js_error_listener() as exceptions:
@@ -54,6 +57,7 @@ async def test_collect_js_exceptions(driver, pages):
5457

5558
@pytest.mark.xfail_firefox
5659
@pytest.mark.xfail_safari
60+
@pytest.mark.xfail_remote
5761
async def test_collect_log_mutations(driver, pages):
5862
async with driver.log_mutation_events() as event:
5963
pages.load("dynamic.html")

py/test/selenium/webdriver/common/click_scrolling_tests.py

+4-13
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def testShouldBeAbleToClickOnAnElementHiddenByOverflow(driver, pages):
6363

6464

6565
@pytest.mark.xfail_firefox
66+
@pytest.mark.xfail_remote
6667
def testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow(driver, pages):
6768
pages.load("scrolling_tests/page_with_double_overflow_auto.html")
6869

@@ -87,6 +88,7 @@ def testShouldNotScrollOverflowElementsWhichAreVisible(driver, pages):
8788

8889

8990
@pytest.mark.xfail_firefox
91+
@pytest.mark.xfail_remote
9092
def testShouldNotScrollIfAlreadyScrolledAndElementIsInView(driver, pages):
9193
pages.load("scroll3.html")
9294
driver.find_element(By.ID, "button2").click()
@@ -148,6 +150,7 @@ def testShouldBeAbleToClickElementThatIsOutOfViewInAFrameThatIsOutOfView(driver,
148150

149151
@pytest.mark.xfail_firefox
150152
@pytest.mark.xfail_chrome
153+
@pytest.mark.xfail_remote
151154
def testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrame(driver, pages):
152155
pages.load("scrolling_tests/page_with_nested_scrolling_frames.html")
153156
driver.switch_to.frame(driver.find_element(By.NAME, "scrolling_frame"))
@@ -160,6 +163,7 @@ def testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrame(driver, pages):
160163
@pytest.mark.xfail_firefox
161164
@pytest.mark.xfail_safari
162165
@pytest.mark.xfail_chrome
166+
@pytest.mark.xfail_remote
163167
def testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOutOfView(driver, pages):
164168
pages.load("scrolling_tests/page_with_nested_scrolling_frames_out_of_view.html")
165169
driver.switch_to.frame(driver.find_element(By.NAME, "scrolling_frame"))
@@ -178,16 +182,3 @@ def testShouldNotScrollWhenGettingElementSize(driver, pages):
178182

179183
def getScrollTop(driver):
180184
return driver.execute_script("return document.body.scrollTop")
181-
182-
183-
# @pytest.mark.xfail_firefox(
184-
# reason='https://github.com/w3c/webdriver/issues/408')
185-
# @pytest.mark.xfail_remote(
186-
# reason='https://github.com/w3c/webdriver/issues/408')
187-
# @pytest.mark.xfail_safari
188-
# def testShouldBeAbleToClickElementInATallFrame(driver, pages):
189-
# pages.load("scrolling_tests/page_with_tall_frame.html")
190-
# driver.switch_to.frame(driver.find_element(By.NAME, "tall_frame"))
191-
# element = driver.find_element(By.NAME, "checkbox")
192-
# element.click()
193-
# assert element.is_selected()

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

+2
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ def testShouldReturnTrueForPresentBooleanAttributes(driver, pages):
271271
@pytest.mark.xfail_chrome
272272
@pytest.mark.xfail_firefox
273273
@pytest.mark.xfail_safari
274+
@pytest.mark.xfail_remote
274275
def testShouldGetUnicodeCharsFromAttribute(driver, pages):
275276
pages.load("formPage.html")
276277
title = driver.find_element(By.ID, "vsearchGadget").get_attribute("title")
@@ -280,6 +281,7 @@ def testShouldGetUnicodeCharsFromAttribute(driver, pages):
280281
@pytest.mark.xfail_chrome
281282
@pytest.mark.xfail_firefox
282283
@pytest.mark.xfail_safari
284+
@pytest.mark.xfail_remote
283285
def testShouldGetValuesAndNotMissItems(driver, pages):
284286
pages.load("attributes.html")
285287
expected = "4b273a33fbbd29013nN93dy4F1A~"

py/test/selenium/webdriver/common/takes_screenshots_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_get_screenshot_as_png(driver, pages):
3636

3737

3838
@pytest.mark.xfail_firefox
39+
@pytest.mark.xfail_remote
3940
def test_get_element_screenshot(driver, pages):
4041
pages.load("simpleTest.html")
4142
element = driver.find_element(By.ID, "multiline")

py/test/selenium/webdriver/common/w3c_interaction_tests.py

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_should_be_able_to_get_pointer_and_keyboard_inputs(driver, pages):
3434

3535
@pytest.mark.xfail_firefox
3636
@pytest.mark.xfail_safari
37+
@pytest.mark.xfail_remote
3738
def testSendingKeysToActiveElementWithModifier(driver, pages):
3839
pages.load("formPage.html")
3940
e = driver.find_element(By.ID, "working")
@@ -51,6 +52,7 @@ def testSendingKeysToActiveElementWithModifier(driver, pages):
5152

5253

5354
@pytest.mark.xfail_firefox
55+
@pytest.mark.xfail_remote
5456
def test_can_create_pause_action_on_keyboard(driver, pages):
5557
# If we don't get an error and takes less than 3 seconds to run, we are good
5658
import datetime

0 commit comments

Comments
 (0)