Closed Bug 1806640 Opened 2 years ago Closed 2 years ago

Marionette client fails to serialize ShadowRoot objects when passed as argument

Categories

(Remote Protocol :: Marionette, defect, P1)

Default
defect
Points:
1

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [webdriver:m5])

Attachments

(1 file)

While running an investigation for shadow root support in Marionette I noticed that the Marionette client fails to serialize ShadowRoot objects in _to_json() with:

ERROR testing/marionette/harness/marionette_harness/tests/unit/test_execute_script.py TestExecuteContent.test_argument_shadow_root - UnboundLocalError: local variable 'wrapped' referenced before assignment
Traceback (most recent call last):
  File "/Users/henrik/code/gecko/testing/marionette/harness/marionette_harness/marionette_test/testcases.py", line 202, in run
    testMethod()
  File "/Users/henrik/code/gecko/testing/marionette/harness/marionette_harness/tests/unit/test_execute_script.py", line 176, in test_argument_shadow_root
    nodeType = self.marionette.execute_script(
  File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 1727, in execute_script
    args = self._to_json(script_args)
  File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 1615, in _to_json
    wrapped.append(self._to_json(arg))
  File "/Users/henrik/code/gecko/testing/marionette/client/marionette_driver/marionette.py", line 1632, in _to_json
    return wrapped

The problem here is that we do not support ShadowRoot objects in _to_json() yet.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Blocks: webdriver:m5
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m5]

Due to an issue on Lando with the meanwhile turned off linter for isort the reviewed patch cannot be landed. Sheriffs, could you please land manually on autoland? Thanks a lot.

Flags: needinfo?(sheriffs)
Pushed by nfay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/23be2debe840 [marionette-client] Support serialization of ShadowRoot objects when used as arguments for commands. CLOSED TREE
Flags: needinfo?(sheriffs)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: