Skip to content

chore: check sent messages against the protocol spec in tests - #3258

Merged
Pavel Feldman (pavelfeldman) merged 2 commits into
microsoft:mainfrom
pavelfeldman:protocol-check
Oct 15, 2026
Merged

Pavel Feldman (pavelfeldman) merged 2 commits into
microsoft:mainfrom
pavelfeldman:protocol-check

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member
  • Generate playwright/_impl/_protocol.py from packages/protocol/spec (scripts/codegen/generate_protocol.py, run by update_api.sh).
  • With PW_CHECK_PROTOCOL=1, which the tests set, check each sent message for unknown commands, unknown or missing parameters, and wrong types. The driver drops unknown parameters silently.
  • Fix what it found: Route.fulfill sent contentType/json, Browser.start_tracing sent path, Locator.clear and Mouse.dblclick sent title, wait_for_function sent polling, and the metadata had apiName/wallTime.
  • Tests use the public API instead of implementation internals; URL matching moves from _helper.py to _url_match.py (was _glob.py).

@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit f549909 into microsoft:main Oct 15, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants