Skip to content

chore: roll to Playwright v1.57.0#578

Merged
mxschmitt merged 2 commits intoplaywright-community:mainfrom
antiremy:main
Jan 16, 2026
Merged

chore: roll to Playwright v1.57.0#578
mxschmitt merged 2 commits intoplaywright-community:mainfrom
antiremy:main

Conversation

@antiremy
Copy link
Contributor

I don't want to make this PR without noting that I used Claude Opus 4.5 and Sonnet 4.5 to assist throughout this upgrade. I'm a developer with over a decade of experience and I use these tools extensively in my day-to-day work; no edits were made without my review. It helped me knock this out in a weekend instead of weeks. Plus, I figured an AI-coded playwright-go compatible with v1.57.0 is better than nothing at all.

I have validated that all test cases pass locally and confirmed that it works both launching locally and connecting via WebSocket in my own project. Even if there are some bugs (which I'm sure there are), I think this is good enough to get this project to 100% for v1.57.0. A summary of these changes (generated by Claude) is below

Key Changes

Protocol Compliance

  • Updated timeout handling for all 67 protocol methods that now require explicit timeout parameters
  • Implemented three-tier timeout resolution: generic injection (30s default), explicit overrides for navigation/launch methods, and page-level timeout settings hierarchy
  • Added support for required timeout fields across Frame, ElementHandle, Page, and BrowserType interfaces

Architecture Updates

  • Refactored selector registration from server-side to context-aware client-side with automatic lifecycle management
  • Fixed race condition in selector registration with proper mutex protection for concurrent access
  • Updated Playwright CLI submodule to v1.57.0

New API Features

  • Added Page.ConsoleMessages() and Page.Requests() methods for retrieving accumulated page events
  • Added ConsoleMessage.Worker() support for console messages originating from web workers
  • Added Locator.Describe() and Locator.Description() for custom locator descriptions in error messages
  • Added Steps parameter to click/hover/drag methods for interpolated mousemove events
  • Added CHIPS (Cookies Having Independent Partitioned State) support with PartitionKey fields

Bug Fixes

  • Fixed data race in selectors.go when registering selectors concurrently with context creation
  • Enhanced null-safety in connection layer for worker and page references
  • Improved error handling in JSON pipe communication with goroutine panic recovery

Testing

  • Updated test suite for v1.57.0 compatibility
  • Enhanced tracing tests with internal-to-public API name mapping
  • All tests passing with race detector enabled

Fix playwright submodule commit

Rerun gofumpt

Change ConsoleMessages to use newConsoleMessage() to properly deserialize event objects

Add test coverage

Update page_test.go

Fix failing end-to-end test

Update README.md

Fix README

Update README.md
@antiremy antiremy mentioned this pull request Jan 13, 2026
@mxschmitt
Copy link
Collaborator

Hey! Thanks for the contribution! Do you think you would be able to unflake the 3 red status checks? Thanks!

@antiremy
Copy link
Contributor Author

@mxschmitt Looking good now!

1. Fix merge conflicts if any, otherwise ignore this step. Once you are happy you can commit the changes `cd playwright; git commit -am "apply patch" && cd ..`
1. Regenerate a new patch `bash scripts/update-patch.sh`
1. Generate go code `go generate ./...`
2. Download current version of Playwright driver `go run scripts/install-browsers/main.go`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert, GitHub does automatically add auto increment numbers when using 1..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was actually to make it more readable for AI Agents. My agent had trouble understanding the order of these steps (and sometimes skipped ones altogether) and I believe it was because all the steps were marked as 1.

I thought this change would be useful without causing any actual issues, but I can revert if you still feel like I should. Just let me know either way

@mxschmitt mxschmitt merged commit fcd06e1 into playwright-community:main Jan 16, 2026
22 checks passed
@mfeckie
Copy link

mfeckie commented Feb 3, 2026

When might this version roll be released?

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