Repository navigation
Backlog
Backlog
Copy link
Labels
B-devtoolsIncludes everything BiDi or Chrome DevTools relatedC-dotnet.NET BindingsC-javaJava BindingsC-nodejsJavaScript BindingsC-pyPython BindingsC-rbRuby BindingsI-enhancementSomething could be better
Description
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 nostart_screencasttest at all.
Where the tests would go:
- Python:
py/test/selenium/webdriver/common/bidi/(publicselenium.webdriver.common.bidi) andpy/test/selenium/webdriver/common/_bidi/(generated layer), inbrowsing_context_tests.pyandemulation_tests.py. - JavaScript:
javascript/selenium-webdriver/test/bidi/generated/browsing_context_test.jsandemulation_test.js. - Java: parameter serialization tests under
java/test/org/openqa/selenium/bidi/protocol/, likeSetViewportParametersTest. 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
SetTextLayoutModeOverridewith a test ([dotnet] [bidi] Add Emulation.SetTextLayoutModeOverride command #18043), butImageSizeandStartScreencast'sDestinationFolderare untested indotnet/test/webdriver/BiDi/BrowsingContext/BrowsingContextTests.cs.
Two generator paths also lack a direct test:
- Python group-reference expansion. [build] Automated CDDL Spec Update #18075 changed
CddlParser._extract_type_fieldsinpy/generate_bidi.pysobrowsingContext.contextCreatedcarriesContextCreatedParameters.bidi_generator_tests.pyonly importsgenerate_bidi_protocol, so only a browser test of the context-created event would catch a regression. - Vendor fields on an extensible record. [js][bidi] Type vendor fields on extensible session capabilities #18337 fixed JS sending and reading
moz:fields onsession.CapabilityResponsethrough the untyped extension map, because the spec marks that record extensible. Python'stest_a_vendor_field_is_folded_into_the_record_it_extendsuses a record that is not extensible. Ruby tests the generator for this case ([rb] type vendor-declared BiDi fields instead of making extended types extensible #18190) but not decoding a realCapabilityResponse. A unit test in each that amoz:field onsession.CapabilityResponsedecodes to its typed field would close it.
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.
Metadata
Metadata
Assignees
Labels
B-devtoolsIncludes everything BiDi or Chrome DevTools relatedC-dotnet.NET BindingsC-javaJava BindingsC-nodejsJavaScript BindingsC-pyPython BindingsC-rbRuby BindingsI-enhancementSomething could be better
Activity
jaduichirag commentedon Nov 26, 2026
I'd like to take the Python part of this: the
imageSize,setTextLayoutModeOverrideandstartScreencastdestinationFoldertests in bothcommon/bidi/andcommon/_bidi/(mirroring the Ruby specs and their browser guards), plus unit tests for the group-reference expansion ingenerate_bidi.pyand decoding amoz:field onsession.CapabilityResponse. I'll open a PR shortly.