[wdspec] Only resize and re-position window in session setup and teardown if needed #43853
Community-TC Integration / wpt-chrome-dev-results-without-changes
succeeded
Jan 5, 2024 in 57m 29s
Community-TC (pull_request)
Collect results for all tests affected by a pull request in chrome but without the changes in the PR.
Details
View task in Taskcluster
View logs in Taskcluster
WPT Command: python3 ./wpt run --channel=dev --no-fail-on-unexpected --log-wptreport=../artifacts/wpt_report.json --log-wptscreenshot=../artifacts/wpt_screenshot.txt --affected task_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --no-headless --verify-log-full --enable-swiftshader chrome
a valid error response as defined by `dfn-send-an-error` and
the provided error code.
:param response: ``webdriver.Response`` instance.
:param error_code: String value of the expected error code
"""
> assert response.status == errors[error_code]
E assert 500 == 404
E +500
E -404
error_code = 'no such element'
response = <Response status=500 error=<JavascriptErrorException http_status=500>>
webdriver/tests/support/asserts.py:51: AssertionError
FAIL test_no_such_element_from_other_window_handle[open] - AssertionError: assert 'stale element reference' == 'no such element'
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
inline = <function inline.<locals>.inline at 0x7f4daf420ee0>, closed = False
@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"])
def test_no_such_element_from_other_window_handle(session, inline, closed):
session.url = inline("<div id='parent'><p/>")
element = session.find.css("#parent", all=False)
new_handle = session.new_window()
if closed:
session.window.close()
session.window_handle = new_handle
response = take_element_screenshot(session, element.id)
> assert_error(response, "no such element")
closed = False
element = <WebElement 2595DDFA9BB8347C6B9DB3AF8E1FA6CA_element_11>
inline = <function inline.<locals>.inline at 0x7f4daf420ee0>
new_handle = '6D82F479FF6EDAEF0A06A26760225489'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
webdriver/tests/classic/take_element_screenshot/screenshot.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
error_code = 'no such element'
def assert_error(response, error_code):
"""
Verify that the provided webdriver.Response instance described
a valid error response as defined by `dfn-send-an-error` and
the provided error code.
:param response: ``webdriver.Response`` instance.
:param error_code: String value of the expected error code
"""
assert response.status == errors[error_code]
assert "value" in response.body
> assert response.body["value"]["error"] == error_code
E AssertionError: assert 'stale element reference' == 'no such element'
E - no such element
E + stale element reference
error_code = 'no such element'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
webdriver/tests/support/asserts.py:53: AssertionError
FAIL test_no_such_element_from_other_window_handle[closed] - AssertionError: assert 'stale element reference' == 'no such element'
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
inline = <function inline.<locals>.inline at 0x7f4daf396550>, closed = True
@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"])
def test_no_such_element_from_other_window_handle(session, inline, closed):
session.url = inline("<div id='parent'><p/>")
element = session.find.css("#parent", all=False)
new_handle = session.new_window()
if closed:
session.window.close()
session.window_handle = new_handle
response = take_element_screenshot(session, element.id)
> assert_error(response, "no such element")
closed = True
element = <WebElement F1E8E47304AC7C7FB053C9D92FE54DB8_element_3>
inline = <function inline.<locals>.inline at 0x7f4daf396550>
new_handle = '5F7BC421282A2AD776A8F9D007937F5E'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
webdriver/tests/classic/take_element_screenshot/screenshot.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
error_code = 'no such element'
def assert_error(response, error_code):
"""
Verify that the provided webdriver.Response instance described
a valid error response as defined by `dfn-send-an-error` and
the provided error code.
:param response: ``webdriver.Response`` instance.
:param error_code: String value of the expected error code
"""
assert response.status == errors[error_code]
assert "value" in response.body
> assert response.body["value"]["error"] == error_code
E AssertionError: assert 'stale element reference' == 'no such element'
E - no such element
E + stale element reference
error_code = 'no such element'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
webdriver/tests/support/asserts.py:53: AssertionError
FAIL test_no_such_element_from_other_frame[open] - AssertionError: assert 'stale element reference' == 'no such element'
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f4daf396e50>
closed = False
@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"])
def test_no_such_element_from_other_frame(session, get_test_page, closed):
session.url = get_test_page(as_frame=True)
frame = session.find.css("iframe", all=False)
session.switch_frame(frame)
element = session.find.css("div", all=False)
session.switch_frame("parent")
if closed:
session.execute_script("arguments[0].remove();", args=[frame])
response = take_element_screenshot(session, element.id)
> assert_error(response, "no such element")
closed = False
element = <WebElement 11F268E6AB5E088547EB2D38E11B7355_element_11>
frame = <WebElement BB9ABE8C788DFD3019E533E63020713B_element_9>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f4daf396e50>
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
webdriver/tests/classic/take_element_screenshot/screenshot.py:82:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
error_code = 'no such element'
def assert_error(response, error_code):
"""
Verify that the provided webdriver.Response instance described
a valid error response as defined by `dfn-send-an-error` and
the provided error code.
:param response: ``webdriver.Response`` instance.
:param error_code: String value of the expected error code
"""
assert response.status == errors[error_code]
assert "value" in response.body
> assert response.body["value"]["error"] == error_code
E AssertionError: assert 'stale element reference' == 'no such element'
E - no such element
E + stale element reference
error_code = 'no such element'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
webdriver/tests/support/asserts.py:53: AssertionError
FAIL test_no_such_element_from_other_frame[closed] - AssertionError: assert 'stale element reference' == 'no such element'
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f4daf3b4700>
closed = True
@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"])
def test_no_such_element_from_other_frame(session, get_test_page, closed):
session.url = get_test_page(as_frame=True)
frame = session.find.css("iframe", all=False)
session.switch_frame(frame)
element = session.find.css("div", all=False)
session.switch_frame("parent")
if closed:
session.execute_script("arguments[0].remove();", args=[frame])
response = take_element_screenshot(session, element.id)
> assert_error(response, "no such element")
closed = True
element = <WebElement 9D6BE3A439DF9E3CC8E8EA4CF6D6A2DD_element_21>
frame = <WebElement 700502AC0E467F7B17A2DE02D1DEB3CD_element_19>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f4daf3b4700>
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session 4c2c5065529f7ee34ffa908f8d256c74>
webdriver/tests/classic/take_element_screenshot/screenshot.py:82:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
error_code = 'no such element'
def assert_error(response, error_code):
"""
Verify that the provided webdriver.Response instance described
a valid error response as defined by `dfn-send-an-error` and
the provided error code.
:param response: ``webdriver.Response`` instance.
:param error_code: String value of the expected error code
"""
assert response.status == errors[error_code]
assert "value" in response.body
> assert response.body["value"]["error"] == error_code
E AssertionError: assert 'stale element reference' == 'no such element'
E - no such element
E + stale element reference
error_code = 'no such element'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
webdriver/tests/support/asserts.py:53: AssertionError
53:56.46 INFO Got 119 unexpected results, with 0 unexpected passes
53:56.46 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
53:56.55 wptserve INFO Stopped http server on 127.0.0.1:8000
53:56.61 wptserve INFO Stopped http server on 127.0.0.1:8446
53:56.61 wptserve INFO Stopped http server on 127.0.0.1:8445
53:56.62 wptserve INFO Stopped http server on 127.0.0.1:8001
53:56.62 wptserve INFO Stopped http server on 127.0.0.1:9000
53:56.62 wptserve INFO Stopped http server on 127.0.0.1:8002
53:56.62 wptserve INFO Stopped http server on 127.0.0.1:8444
53:56.62 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
53:56.66 wptserve INFO Stopped http server on 127.0.0.1:8003
53:56.70 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
53:56.81 wptserve INFO Stopped http server on 127.0.0.1:8443
53:56.85 INFO Removed font: Ahem.ttf
53:56.87 INFO Closing logging queue
53:56.87 INFO queue closed
53:56.87 INFO Tolerating 119 unexpected results
X connection to :99.0 broken (explicit kill or server shutdown).
[taskcluster 2024-01-05 16:05:02.706Z] === Task Finished ===
[taskcluster 2024-01-05 16:05:03.369Z] Successful task run with exit code: 0 completed in 3400.183 seconds
Loading