Skip to content

Register the collector at document start via BiDi preload #284

Description

@vishnuv688

Part of #277

The JS adapters register the collector through BiDi
script.addPreloadScript with no browsing-context id, so every document
instruments itself before any of its own script runs. Python appends a script tag
after the fact, which is exactly the race class core/bidi-preload.ts exists to
remove. Measured on the JS side: 29 of 29 input events and 4 of 4 DOM anchors with
the preload, against 21 of 29 and 3 of 4 without.

Acceptance criteria

The collector is registered per session as a
document-start preload when webSocketUrl is present. The script-tag path remains
as the no-BiDi fallback, gated on a preloadRegistered flag. Measured on the
example: every document anchored, and no row replaying another document's DOM.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestselenium-devtools-pyPython Selenium adapter for the DevTools dashboard

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions