Skip to content

Conversation

@antiremy
Copy link

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
Author

@mxschmitt Looking good now!

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.

2 participants