Closed Bug 1909455 Opened 3 months ago Closed 2 months ago

Returned value of "unhandledPromptBehavior" for "session.new" has an invalid value "dismiss and notify" when unspecified

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

Firefox 130
defect
Points:
3

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: dariokondratiuk, Assigned: Sasha)

References

(Blocks 1 open bug)

Details

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

Attachments

(2 files)

Steps to reproduce:

Called the session.new with the arguments

{"id":1,"method":"session.new","params":{"capabilities":{"alwaysMatch":{"acceptInsecureCerts":false,"webSocketUrl":true}}}}

Actual results:

I got the response

{"type":"success","id":1,"result":{"sessionId":"4baa79eb-cbfc-4eec-8a8b-3a0b8561268a","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"130.0a1","platformName":"mac","unhandledPromptBehavior":"dismiss and notify","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0","moz:buildID":"20240722092846","moz:headless":false,"moz:platformVersion":"23.5.0","moz:processID":33451,"moz:profile":"/var/folders/_d/6zl2pzmn1cd0y9h9rdx6zwcc0000gn/T/qcmjvky2.bg4","moz:shutdownTimeout":60000,"proxy":{}}}

Expected results:

According to the docs https://w3c.github.io/webdriver-bidi/#type-session-UserPromptHandler, "dismiss and notify" is not a valid value

The Bugbug bot thinks this bug should belong to the 'Firefox::Session Restore' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Session Restore

I don't think this belongs here, moving it. Bad bot.

Component: Session Restore → WebDriver BiDi
Product: Firefox → Remote Protocol

Thanks for the report! As it looks like this is a problem with the WebDriver BiDi specification especially when serializing the user prompt handler:
https://w3c.github.io/webdriver/#dfn-serialize-the-user-prompt-handler

When the capability hasn't been specified when requesting a new session we don't have any entry and the map is null, and in the serialization steps we just return dismiss and notify as first step. Most likely we should make that dependent on the BiDi flag to make it conforming to the CDDL.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Webdriver Bidi: session.new returns an invalid unhandledPromptBehavior → "session.new" returns "dismiss and notify"
Blocks: 1719290
Summary: "session.new" returns "dismiss and notify" → Returned value of "unhandledPromptBehavior" for "session.new" has an invalid value "dismiss and notify" when unspecified

Using an empty object as value for session.new we return that as well. Given that the capability is optional in the returned capabilities we might actually not include it at all?

In the scope of this bug, let's just stop returning the capability if it's not provided by the client.
We can file a follow up to handle the edge cases that still exist in the spec.

Severity: -- → S3
Points: --- → 3
Priority: -- → P2
Whiteboard: [webdriver:m12]
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/228cec8e3476 [bidi] Do not return "unhandledPromptBehavior" capability when not provided by a client. r=webdriver-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/d3fca12d84b3 [wdspec] Update the tests for "session.new" command to not return "unhandledPromptBehavior" capability by default. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Whiteboard: [webdriver:m12] → [webdriver:m12][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: