Skip to content

[🚀 Feature]: Add binding tests for BiDi surface added by automated CDDL updates #18382

Backlog

Description

@titusfortner

Description

The daily CDDL update (update-cddl.yml) regenerates common/bidi/schema.json. Java, Python and JavaScript generate their BiDi layer from it at build time, so an update adds public API to those bindings with no diff in them and no test. Ruby backfilled tests for the September updates in 27ef657. The other bindings still have none for these:

Added by Change Ruby test to mirror Missing in
#17990 browsingContext.captureScreenshot imageSize browsing_context_spec.rb "limits the screenshot to the requested image size" Python, JavaScript, Java, .NET
#18046 emulation.setTextLayoutModeOverride emulation_spec.rb "sets and clears text layout mode override" Python, JavaScript, Java
#18046 browsingContext.startScreencast destinationFolder browsing_context_spec.rb "saves the screencast in the destination folder" Python, JavaScript, Java, .NET

Ruby specs are under rb/spec/integration/selenium/webdriver/bidi/protocol/. Their guards show current browser support:

  • imageSize: Chrome and Firefox; Safari ignores it.
  • setTextLayoutModeOverride: Chromium only; Firefox returns unknown command.
  • startScreencast: Firefox only; Chromium returns unsupported operation. Python has no start_screencast test at all.

Where the tests would go:

  • Python: py/test/selenium/webdriver/common/bidi/ (public selenium.webdriver.common.bidi) and py/test/selenium/webdriver/common/_bidi/ (generated layer), in browsing_context_tests.py and emulation_tests.py.
  • JavaScript: javascript/selenium-webdriver/test/bidi/generated/browsing_context_test.js and emulation_test.js.
  • Java: parameter serialization tests under java/test/org/openqa/selenium/bidi/protocol/, like SetViewportParametersTest. These commands predate the Java generator ([java][bidi] Add BiDi code generator #17777), so they arrived with it rather than as updates.
  • .NET is written by hand. It added SetTextLayoutModeOverride with a test ([dotnet] [bidi] Add Emulation.SetTextLayoutModeOverride command #18043), but ImageSize and StartScreencast's DestinationFolder are untested in dotnet/test/webdriver/BiDi/BrowsingContext/BrowsingContextTests.cs.

Two generator paths also lack a direct test:

Have you considered any alternatives or workarounds?

A generic test that every schema command serializes would catch generator breakage, but not whether browsers accept the new parameters, which is what these tests check.

Activity

  1. added
    C-py
    C-rb
    C-dotnet
    C-java
    C-nodejs
    I-enhancement
    B-devtools
    on Nov 24, 2026
  2. jaduichirag commented on Nov 26, 2026

    @jaduichirag

    I'd like to take the Python part of this: the imageSize, setTextLayoutModeOverride and startScreencast destinationFolder tests in both common/bidi/ and common/_bidi/ (mirroring the Ruby specs and their browser guards), plus unit tests for the group-reference expansion in generate_bidi.py and decoding a moz: field on session.CapabilityResponse. I'll open a PR shortly.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-devtoolsC-dotnetC-javaC-nodejsC-pyC-rbI-enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions