[WebDriver BiDi] addPreloadScript
supports contexts
#41932
Merged
Community-TC Integration / wpt-chrome-dev-results
succeeded
Jan 5, 2024 in 57m 58s
Community-TC (pull_request)
Collect results for all tests affected by a pull request in chrome.
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 base_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 db1f85c313dd4bd3a85dbdd4ece7f41f>
inline = <function inline.<locals>.inline at 0x7f9f1f32f1f0>, 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 B1240DACB920811AA33BD6ED7085A6E0_element_11>
inline = <function inline.<locals>.inline at 0x7f9f1f32f1f0>
new_handle = '7D406CC8A9EFD7F4F4B3421E1B4B34F9'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session db1f85c313dd4bd3a85dbdd4ece7f41f>
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 db1f85c313dd4bd3a85dbdd4ece7f41f>
inline = <function inline.<locals>.inline at 0x7f9f1f144d30>, 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 60B065C5558047628AF9E75642C1644C_element_3>
inline = <function inline.<locals>.inline at 0x7f9f1f144d30>
new_handle = 'C287F3767BF35E876FF69D3D82608CF0'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session db1f85c313dd4bd3a85dbdd4ece7f41f>
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 db1f85c313dd4bd3a85dbdd4ece7f41f>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f9f1fa4aca0>
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 E3E7CFBB84EFD43A3FE6A04B6532115D_element_11>
frame = <WebElement EFAF756D7568E5DDE75149CFA6909DF2_element_9>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f9f1fa4aca0>
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session db1f85c313dd4bd3a85dbdd4ece7f41f>
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 db1f85c313dd4bd3a85dbdd4ece7f41f>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f9f1ea39d30>
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 187B88B2509AFAE84D11E4B17D5577A2_element_21>
frame = <WebElement 942F7ADAC8C183229969A438BAFA836C_element_20>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f9f1ea39d30>
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session = <Session db1f85c313dd4bd3a85dbdd4ece7f41f>
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:47.80 INFO Got 121 unexpected results, with 0 unexpected passes
53:47.80 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
53:47.80 wptserve INFO Stopped http server on 127.0.0.1:8000
53:47.81 wptserve INFO Stopped http server on 127.0.0.1:8002
53:47.82 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
53:47.82 wptserve INFO Stopped http server on 127.0.0.1:8444
53:47.82 wptserve INFO Stopped http server on 127.0.0.1:8445
53:47.83 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
53:47.83 wptserve INFO Stopped http server on 127.0.0.1:8003
53:47.83 wptserve INFO Stopped http server on 127.0.0.1:8446
53:47.84 wptserve INFO Stopped http server on 127.0.0.1:9000
53:47.90 wptserve INFO Stopped http server on 127.0.0.1:8001
53:48.08 wptserve INFO Stopped http server on 127.0.0.1:8443
53:48.12 INFO Removed font: Ahem.ttf
53:48.14 INFO Closing logging queue
53:48.14 INFO queue closed
53:48.14 INFO Tolerating 121 unexpected results
X connection to :99.0 broken (explicit kill or server shutdown).
[taskcluster 2024-01-05 16:36:35.204Z] === Task Finished ===
[taskcluster 2024-01-05 16:36:35.870Z] Successful task run with exit code: 0 completed in 3474.386 seconds
Loading