Closed Bug 1916522 Opened 1 year ago Closed 1 month ago

New session response does not include required property setWindowRect

Categories

(Remote Protocol :: Agent, defect, P3)

defect
Points:
1

Tracking

(firefox147 fixed)

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: james.h.evans.jr, Assigned: whimboo)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webdriver:m18][webdriver:relnote])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

Attempt to create a new WebDriver BiDi-only session.

Command payload:
{"id":1,"method":"session.new","params":{"capabilities":{}}}

Actual results:

Response value does not have required property setWindowRect.

{"type":"success","id":1,"result":{"sessionId":"29b276c3-2ece-4ea2-b2a6-67566b9bc232","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"132.0a1","platformName":"mac","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0","moz:buildID":"20240903092500","moz:headless":false,"moz:platformVersion":"23.6.0","moz:processID":32142,"moz:profile":"/var/folders/c2/b_92c0_j45982zbd3b6vwp0r0000gp/T/webdriverbidi-net-firefox-data-5da7b306-70a5-46b6-8470-af28190e7733","moz:shutdownTimeout":60000,"proxy":{}}}}

Expected results:

According to the command response definition of the new session command (https://w3c.github.io/webdriver-bidi/#command-session-new), the response value should contain a boolean setWindowRect property.

Blocks: 1719290
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Firefox 132 → Trunk

For the moment we actually have to return this capability because it is listed as mandatory. But it might change in the future. Right now it's unclear if we need it or not and we can verify once the command to set the window position and size (bug 1855028) has landed for BiDi.

There are a couple of existent WebDriver classic issues around this capability.

To fix it in Firefox we can make it similar to Marionette and return the support based if we are on Android or not.

https://searchfox.org/mozilla-central/rev/c414b4538dd3c7e1dc674f7b66176e7c309afa95/remote/shared/webdriver/Capabilities.sys.mjs#477

Severity: -- → S3
Priority: -- → P3

It is impossible to write a client that strictly adheres to the WebDriver BiDi protocol and create a BiDi-only session with Firefox while this bug is present. The protocol requires the presence of the setWindowRect property in the New Session command response, and the client will (and should) throw if the property is omitted from the response. Either Mozilla should make Firefox spec-compliant, or the spec should be change to allow the presence of the setWindowRect property to be optional in the response for the New Session command.

Note, I don't have a preference for which route is taken, only that one is taken.

With out a BiDi-only infrastructure for WebDriver tests this will not be testable at the moment - at least for us given that we only support a single WebDriver session.

See Also: → 1836785
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

The attached patch makes our implementation WebDriver BiDi spec compatible.

Mentor: hskupin
Whiteboard: [lang=js]
Points: --- → 1
Whiteboard: [webdriver:m18]
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9d4b13533904 https://hg.mozilla.org/integration/autoland/rev/887a4a57355a [webdriver-bidi] The "session.new" command has to return the "setWindowRect" capability. r=Sasha
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Whiteboard: [webdriver:m18] → [webdriver:m18][webdriver:relnote]
Component: WebDriver BiDi → Agent
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: