The tests in `test_primitives` don't use `Execute Script` but `Get Element Property" and given my patch from bug 1398792 it should also work for arrays and objects. The problem is that in such cases we do not wrap the response from Marionette into a `value`, so geckodriver fails to actually read it. https://searchfox.org/mozilla-central/rev/d416a7b827c2d76b12848e355a4e03dde49ece25/testing/geckodriver/src/marionette.rs#1080-1091 But because of [this code in `server.sys.mjs`](https://searchfox.org/mozilla-central/rev/b0e929cfaf3994cad2dd02afdac138083ee3fc84/remote/marionette/server.sys.mjs#306) we have different behavior between array/object and basic types. So we might need a tri-state handling in geckodriver. Means if value is present use it, and if not use the result. The other option is to always wrap the result in a `value` field but that causes failures in eg. `NewSession` with capabilities. But maybe that would be easier to fix.
Bug 1793845 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
The tests in `test_primitives` don't use `Execute Script` but `Get Element Property` and given my patch from bug 1398792 it should also work for arrays and objects. The problem is that in such cases we do not wrap the response from Marionette into a `value`, so geckodriver fails to actually read it. https://searchfox.org/mozilla-central/rev/d416a7b827c2d76b12848e355a4e03dde49ece25/testing/geckodriver/src/marionette.rs#1080-1091 But because of [this code in `server.sys.mjs`](https://searchfox.org/mozilla-central/rev/b0e929cfaf3994cad2dd02afdac138083ee3fc84/remote/marionette/server.sys.mjs#306) we have different behavior between array/object and basic types. So we might need a tri-state handling in geckodriver. Means if value is present use it, and if not use the result. The other option is to always wrap the result in a `value` field but that causes failures in eg. `NewSession` with capabilities. But maybe that would be easier to fix.