Skip to content

[WebDriver BiDi] Add tests for session.new - #63552

Open
sergedeh wants to merge 1 commit into
web-platform-tests:masterfrom
sergedeh:webdriver-bidi-session-new
Open

sergedeh wants to merge 1 commit into
web-platform-tests:masterfrom
sergedeh:webdriver-bidi-session-new

Conversation

@sergedeh

@sergedeh sergedeh commented Oct 12, 2026 •

Copy link
Copy Markdown

Summary

Add WebDriver BiDi conformance coverage for session.new.

The tests discover the remote end's unassociated WebSocket URL through a temporary classic session with webSocketUrl enabled. They then use the existing BidiSession.bidi_only() client path to create and exercise sessions.
The requested capabilities retain the runner's configured browser options so the tests work with implementations that require launch configuration.

Test coverage

The new suite verifies that:

  • a successful command returns a session ID and all required capability fields;
  • the initiating connection is session-associated before success is observable;
  • an invalid capability request leaves the same connection reusable;
  • a second session.new on an already associated connection returns session not created without affecting the existing session;
  • a BiDi-only session is not addressable through classic HTTP commands; and
  • after ending a BiDi-only session, another BiDi-only session can be created and used.

Client support

SessionNotCreatedException is added to the Python BiDi error mapping so the tests can assert the protocol's session not created response directly.

Related coverage

#63212 covers generic command dispatch without an associated session. #63260 covers cleanup owned by session.end; this suite uses session.end only to establish the precondition for creating a replacement session.

Fixes #63550

Disclosure: I used an LLM as a tool while preparing this change. I reviewed and revised the tests and description and take responsibility for the submission.

Cover observable session.new behavior: the required result shape, connection association before success, connection reuse after capability failure, capability validation before capacity rejection, rejection of a valid request on an already associated connection, HTTP isolation, replacement-session creation after session.end, reconnection after transport closure, and rejection of reconnection after definitive session teardown.

Add the Python BiDi error mapping for the session not created response.

Fixes web-platform-tests#63550.

An LLM was used as a tool while preparing this change. The commit author reviewed and revised the tests and supporting text, ran the validation, and takes responsibility for the contribution.
@sergedeh
sergedeh force-pushed the webdriver-bidi-session-new branch from 0d5af67 to dd2b9e8 Compare October 19, 2026 03:17

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WebDriver BiDi] Add conformance coverage for session.new

3 participants