Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1824664] [wdspec] Add "Get Element Text" tests for ShadowRoot with slot. #43282

Merged
merged 1 commit into from
Nov 21, 2023

[wdspec] Add "Get Element Text" tests for ShadowRoot with slot.

5aef8e4
Select commit
Failed to load commit list.
Merged

[Gecko Bug 1824664] [wdspec] Add "Get Element Text" tests for ShadowRoot with slot. #43282

[wdspec] Add "Get Element Text" tests for ShadowRoot with slot.
5aef8e4
Select commit
Failed to load commit list.
Community-TC Integration / wpt-chrome-dev-results-without-changes succeeded Nov 21, 2023 in 2m 38s

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


session = <Session 8fb951e6f428d0f14efe5341c1eddaa7>
inline = <function inline.<locals>.inline at 0x7f4633376280>, 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 = get_element_text(session, element.id)
>       assert_error(response, "no such element")

closed     = False
element    = <WebElement 9487C1995172DB4A20876E210534C4B2_element_9>
inline     = <function inline.<locals>.inline at 0x7f4633376280>
new_handle = '6EF83B2690182A686DAC884E27C58261'
response   = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session    = <Session 8fb951e6f428d0f14efe5341c1eddaa7>

webdriver/tests/classic/get_element_text/get.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

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 8fb951e6f428d0f14efe5341c1eddaa7>
inline = <function inline.<locals>.inline at 0x7f4633376a60>, 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 = get_element_text(session, element.id)
>       assert_error(response, "no such element")

closed     = True
element    = <WebElement 490F6951BC7828AC40293184F8E9EBF5_element_3>
inline     = <function inline.<locals>.inline at 0x7f4633376a60>
new_handle = 'B0E72AB6186FD0C9A1FEFCCDEE38E47F'
response   = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session    = <Session 8fb951e6f428d0f14efe5341c1eddaa7>

webdriver/tests/classic/get_element_text/get.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

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 8fb951e6f428d0f14efe5341c1eddaa7>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f4633308430>
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 = get_element_text(session, element.id)
>       assert_error(response, "no such element")

closed     = False
element    = <WebElement 168B276D2916C10D5241EF974D517358_element_9>
frame      = <WebElement 36EDC1497276E08D2C0A015B604C1DA6_element_7>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f4633308430>
response   = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session    = <Session 8fb951e6f428d0f14efe5341c1eddaa7>

webdriver/tests/classic/get_element_text/get.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

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 8fb951e6f428d0f14efe5341c1eddaa7>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f463330dca0>
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 = get_element_text(session, element.id)
>       assert_error(response, "no such element")

closed     = True
element    = <WebElement 29E26D65ADBE12D0A9E3938697D297BA_element_17>
frame      = <WebElement 5487AFE395526AA35094709159BE8530_element_16>
get_test_page = <function get_test_page.<locals>.get_test_page at 0x7f463330dca0>
response   = <Response status=404 error=<StaleElementReferenceException http_status=404>>
session    = <Session 8fb951e6f428d0f14efe5341c1eddaa7>

webdriver/tests/classic/get_element_text/get.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

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_pretty_print_xml - AssertionError: assert '' == 'cheese'
session = <Session 8fb951e6f428d0f14efe5341c1eddaa7>
inline = <function inline.<locals>.inline at 0x7f4633376430>

    def test_pretty_print_xml(session, inline):
        session.url = inline("<xml><foo>che<bar>ese</bar></foo></xml>", doctype="xml")
    
        elem = session.find.css("foo", all=False)
>       assert elem.text == "cheese"
E       AssertionError: assert '' == 'cheese'
E         - cheese

elem       = <WebElement A2008ED2FD90ECA8B989D6C362488280_element_48>
inline     = <function inline.<locals>.inline at 0x7f4633376430>
session    = <Session 8fb951e6f428d0f14efe5341c1eddaa7>

webdriver/tests/classic/get_element_text/get.py:109: AssertionError
 0:28.70 INFO Got 1 unexpected results, with 0 unexpected passes
 0:28.70 wptserve INFO Stopped WebTransport over HTTP/3 server on 127.0.0.1:11000
 0:28.75 wptserve INFO Stopped http server on 127.0.0.1:8443
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8003
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8444
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8446
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8445
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8001
 0:28.80 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8888))
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:9000
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8002
 0:28.80 wptserve INFO Stopped http server on 127.0.0.1:8000
 0:28.81 wptserve INFO Close on: (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 8889))
 0:28.90 INFO Removed font: Ahem.ttf
 0:28.92 INFO Closing logging queue
 0:28.92 INFO queue closed
 0:28.92 INFO Tolerating 1 unexpected results
[taskcluster 2023-11-21 11:34:41.056Z] === Task Finished ===
[taskcluster 2023-11-21 11:34:41.819Z] Successful task run with exit code: 0 completed in 114.353 seconds