Skip to content

[Editorial review] BiDi - Add pages for new, status, and end commands of the session module#43251

Merged
dipikabh merged 17 commits intomdn:mainfrom
dipikabh:bidi-session-commands1
Mar 12, 2026
Merged

[Editorial review] BiDi - Add pages for new, status, and end commands of the session module#43251
dipikabh merged 17 commits intomdn:mainfrom
dipikabh:bidi-session-commands1

Conversation

@dipikabh
Copy link
Contributor

@dipikabh dipikabh commented Feb 25, 2026

Description

This PR adds the following pages:

  • session listing page
  • session.new
  • session.status
  • session.end

It also updates:

  • Modules landing page - adds basic info about how commands and events are structured
  • WebDriver sidebar (webdriver.yaml)

UPDATE: As part of addressing review feedback, this PR now also adds stub pages for all modules.

Additional details

Since BiDi builds on capabilities and errors defined in Classic, we can share a lot of those pages between the two.
So it might make sense to move them to common location under Web/WebDriver/Reference and out of the folders under Web/WebDriver/Reference/Classic where they currently sit.

  • I plan to place them directly under Web/WebDriver/Reference so that both Classic and BiDi commands can link to them.
  • On the individual capability and error pages, we can note any differences in the behavior or format between Classic and BiDi.

I'll make these changes in a separate PR. ✅
UPDATE: Done in #43314

@whimboo pointed out that the top landing page https://developer.mozilla.org/en-US/docs/Web/WebDriver is also in need of an update since the addition of our BiDi section - I'll update this page along with the above structural changes.

Spec links

Related issue

Doc issue: mdn/mdn#339

@dipikabh dipikabh requested a review from a team February 25, 2026 23:04
@dipikabh dipikabh requested review from a team as code owners February 25, 2026 23:04
@dipikabh dipikabh requested review from hamishwillee and pepelsbey and removed request for a team February 25, 2026 23:04
@github-actions github-actions bot added the Content:WebDriver WebDriver docs label Feb 25, 2026
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Feb 25, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

Preview URLs (21 pages)
Flaws (48)

Note! 19 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/WebDriver/Reference/Capabilities
Title: WebDriver capabilities
Flaw count: 12

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/Classic/Capabilities/setWindowRect doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Capabilities/browserName doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Capabilities/browserVersion doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Capabilities/platformName doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Capabilities/pageLoadStrategy doesn't resolve
    • and 7 more flaws omitted

URL: /en-US/docs/Web/WebDriver/Reference/Errors
Title: WebDriver errors
Flaw count: 36

  • broken_links:
    • Link /en-US/docs/Web/WebDriver/Reference/Errors/UnexpectedAlertOpen doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Errors/UnexpectedAlertOpen doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Clients doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/Errors/ElementClickIntercepted doesn't resolve
    • Link /en-US/docs/Web/WebDriver/Reference/ElementClick doesn't resolve
    • and 31 more flaws omitted

(comment last updated: 2026-03-11 23:26:46)

Copy link
Contributor

@juliandescottes juliandescottes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I'll let Henrik do the final technical review, just one nitpick on my side.

Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great start with the session module @dipikabh! Very well written with all the details and nice examples. I've some questions and suggestions still, which you can find inline. Please let one of us know when something is unclear, and we can help to clarify.

- `webSocketUrl` {{optional_inline}}
- : A string that contains the WebSocket URL for the session.

The browser may also return vendor-specific capabilities prefixed with a browser identifier (for example, `moz:buildID` for Firefox).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can have a separate page for those vendor specific capabilities.

Copy link
Contributor Author

@dipikabh dipikabh Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a precedent with firefoxOptions for vendor-specific capabilities. However, that's client-sent.

We don't have dedicated pages for browser-sent capabilities. So we might not cover them in that detail. But if important, I can include an example or a note about Firefox-specific metadata included in return value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it that we don't want to cover vendor specific capabilities or what's the reason why we cannot cover them in such a detail? Maybe we could have a separate section on the firefoxOptions page that handles return-only capabilities?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, this metadata, moz:buildID, comes under Extensible in the spec - it's an implementation detail that can vary by browser. That said, we do already document firefoxOptions.

It might open the door for other browsers to add content for their return capability parameters.

I'm curious - how many such Firefox-specific fields are there in the return value, and what is the expected level of detail?
Is it something your team can help put together as a first draft and I can edit?

separate section on the firefoxOptions page that handles return-only capabilities

I think if we document return-only capabilities, they would be better as new, separate pages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we have the following Mozilla specific vendor capabilities:

https://searchfox.org/firefox-main/rev/0894e095dfb46b6dac785365432791a54861fe09/remote/shared/webdriver/Capabilities.sys.mjs#492-497,508-510

Some of them are only returned and others are used for processing capabilities as well (means, they will be fed with the new session command).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps I can queue up this task for a future date

@github-actions github-actions bot added size/l [PR only] 501-1000 LoC changed and removed size/m [PR only] 51-500 LoC changed labels Feb 27, 2026
Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that looks good for the initial landing of the session module. Great additions to have the placeholders for all modules present as well now. Thanks a lot!

@dipikabh
Copy link
Contributor Author

dipikabh commented Mar 2, 2026

Thanks a lot @whimboo for the tech review and approval!

I've addressed/answered your comments and questions. There is just one more minor update since your last review.

I also have two open questions (here and here) before I invite the content team for an edit review.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

This pull request has merge conflicts that must be resolved before it can be merged.

@dipikabh dipikabh force-pushed the bidi-session-commands1 branch from f88503e to 4c1ac73 Compare March 2, 2026 19:58
@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Mar 2, 2026
@dipikabh
Copy link
Contributor Author

dipikabh commented Mar 2, 2026

Rebased this branch to include the changes in #43314, which moves Capabilities and Errors out of Classic.

@dipikabh dipikabh changed the title [Technical review] BiDi - Add pages for new, status, and end commands of the session module [Editorial review] BiDi - Add pages for new, status, and end commands of the session module Mar 3, 2026
@dipikabh dipikabh requested a review from chrisdavidmills March 3, 2026 15:27
@dipikabh
Copy link
Contributor Author

dipikabh commented Mar 3, 2026

Hi Chris, I'd appreciate if you can provide me an editorial review for this when you get a chance. Thanks!

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dipikabh, here's my editorial review!

I think this is largely useful and well-structured. My comments are fairly picky, and some are definitely a result of my inexperience with WebDriver BiDi. Still worth asking through, IMO.

I was approaching these articles as a beginner (which I am) while trying to put myself in the mindset of someone with previous BiDi experience, and thinking about what they might need.

@dipikabh
Copy link
Contributor Author

Thanks for the thorough review, Chris! Lots of food for thought.
I'll tackle the remaining comments in session/new tomorrow.

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm pretty happy with this now, @dipikabh, so I'm approving from an editorial standpoint.

You've done a great job on this first set of documentation for WebDriver BiDi. It's obviously an unknown for us on the MDN team, and there will likely be things you'll want to improve on later after you've had some wider feedback. But for now, I think this is more than good enough to publish.

Good work.

@dipikabh
Copy link
Contributor Author

Thanks so much, @chrisdavidmills! Your feedback has helped me think through the phrasing and details to look out for. It'll definitely help as I work through more BiDi pages.
Really appreciate the thoughtful review.

there will likely be things you'll want to improve on later after you've had some wider feedback.

Agree, that's always the case

@dipikabh dipikabh merged commit fbf7337 into mdn:main Mar 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebDriver WebDriver docs size/l [PR only] 501-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants