Closed Bug 1817430 Opened 3 years ago Closed 3 years ago

Intermittent /webdriver/tests/execute_script/arguments.py | test_no_such_element_from_other_window_handle[closed] - assert 200 == 404

Categories

(Remote Protocol :: Marionette, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1804059

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure)

Filed by: sstanca [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=406025356&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/S3OT4OJmTJijQ2MGYsZylQ/runs/0/artifacts/public/logs/live_backing.log


[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - TEST-PASS | /webdriver/tests/execute_script/arguments.py | test_no_such_element_from_other_window_handle[open] 
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/execute_script/arguments.py | test_no_such_element_from_other_window_handle[closed] - assert 200 == 404
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - session = <Session 6f7a0940-46c0-4e56-a4f4-01b7b7068f8b>
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - inline = <function inline.<locals>.inline at 0x7f5a2db121e0>, closed = True
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -     @pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"])
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -     def test_no_such_element_from_other_window_handle(session, inline, closed):
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -         session.url = inline("<div id='parent'><p/>")
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -         element = session.find.css("#parent", all=False)
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -     
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -         new_handle = session.new_window()
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -     
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -         if closed:
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -             session.window.close()
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -     
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -         session.window_handle = new_handle
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -     
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO -         result = execute_script(session, "return true;", args=[element])
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - >       assert_error(result, "no such element")
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.322Z] 12:38:16     INFO - closed     = True
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - element    = <Element 74ae20d5-22c1-4db6-a956-609b3acd0d91>
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - inline     = <function inline.<locals>.inline at 0x7f5a2db121e0>
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - new_handle = 'b73291a4-4d3f-4de7-8e0c-071239ec73f4'
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - result     = <[ValueError('Sign not allowed in string format specifier',) raised in repr()] Response object at 0x7f5a2db17278>
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - session    = <Session 6f7a0940-46c0-4e56-a4f4-01b7b7068f8b>
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - tests/web-platform/tests/webdriver/tests/execute_script/arguments.py:69: 
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - response = <[ValueError('Sign not allowed in string format specifier',) raised in repr()] Response object at 0x7f5a2db17278>
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - error_code = 'no such element'
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -     def assert_error(response, error_code):
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         """
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         Verify that the provided webdriver.Response instance described
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         a valid error response as defined by `dfn-send-an-error` and
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         the provided error code.
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -     
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         :param response: ``webdriver.Response`` instance.
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         :param error_code: String value of the expected error code
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO -         """
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - >       assert response.status == errors[error_code]
[task 2023-02-17T12:38:16.323Z] 12:38:16     INFO - E       assert 200 == 404
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - E         +200
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - E         -404
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - error_code = 'no such element'
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - response   = <[ValueError('Sign not allowed in string format specifier',) raised in repr()] Response object at 0x7f5a2db17278>
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - 
[task 2023-02-17T12:38:16.324Z] 12:38:16     INFO - tests/web-platform/tests/webdriver/tests/support/asserts.py:50: AssertionError
[task 2023-02-17T12:38:16.332Z] 12:38:16     INFO - ...............
[task 2023-02-17T12:38:16.332Z] 12:38:16     INFO - TEST-OK | /webdriver/tests/execute_script/arguments.py | took 11637ms

Inappropriately null is returned:

[task 2023-02-17T12:38:10.593Z] 12:38:10     INFO - PID 2582 | 1676637490592	webdriver::server	DEBUG	-> POST /session/6f7a0940-46c0-4e56-a4f4-01b7b7068f8b/execute/sync {"script": "return true;", "args": [{"element-6066-11e4-a52e-4f735466cecf": "74ae20d5-22c1-4db6-a956-609b3acd0d91"}]}
[task 2023-02-17T12:38:10.611Z] 12:38:10     INFO - PID 2582 | 1676637490610	webdriver::server	DEBUG	<- 200 OK {"value":null}
Status: NEW → RESOLVED
Closed: 3 years ago
Duplicate of bug: 1804059
Resolution: --- → DUPLICATE
Moving bug to Remote Protocol::Marionette component per bug 1815831.
Component: geckodriver → Marionette
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.