github mxschmitt/playwright-go v0.6201.1

4 hours ago

Go-only patch release on top of the v1.62.1 driver. The bundled driver version is unchanged, so no reinstall is needed when upgrading from v0.6201.0.

Four any-typed parameters accepted argument types the generated docs promised but the code did not handle, and each failed by panicking rather than reporting an error. All four now behave as documented.

Fixes

  • Page.ExpectRequest / Page.ExpectResponse accept func(Request) bool / func(Response) bool predicates again, so waits can filter on Method(), Status(), headers or post data instead of the URL alone (#627).
  • ToHaveText, ToContainText and ToHaveClass accept mixed lists of strings and regexps ([]any{"alpha", regexp.MustCompile("bet.")}), matching upstream's Array<string|RegExp>. Homogeneous []string / []*regexp.Regexp are unaffected.
  • ExpectEvent / WaitForEvent reject the wait with a descriptive error when the predicate is unusable — not a function, wrong argument type, wrong return type, or panicking — instead of crashing the process from the library's own dispatch goroutine. A typed-nil predicate now means "no predicate".
  • The GetBy* family on Page, Frame, Locator and FrameLocator, GetByRole's Name/Description options, and the HasText/HasNotText locator options report an invalid argument type through Locator.Err() instead of panicking.

Internal

  • Driver protocol messages are decoded with encoding/json rather than the vendored Go 1.6 JSON fork in go-jose/v3 — about 20% faster on large frames at the same allocation count. github.com/go-jose/go-jose/v3 and golang.org/x/crypto leave the module graph (investigated for #631).

What's Changed

  • feat: add release-playwright skill and CLAUDE.md by @mxschmitt in #630
  • test: stop TestShouldUploadAFolderRemote from eating the package timeout by @mxschmitt in #632
  • fix: accept Request/Response predicates in Page.ExpectRequest/ExpectResponse by @mxschmitt in #633
  • fix: accept mixed string/regexp lists in ToHaveText, ToContainText, ToHaveClass by @mxschmitt in #634
  • chore: decode driver protocol messages with encoding/json by @mxschmitt in #636
  • ci: stop commits to main from serializing into one concurrency queue by @mxschmitt in #638
  • chore: modernize the docs site and refresh the README by @mxschmitt in #639
  • docs: fix the coverage badge and link the CI badge by @mxschmitt in #640
  • fix: report invalid GetBy*/HasText argument types instead of panicking by @mxschmitt in #637
  • fix: reject unusable event predicates instead of panicking in the dispatch goroutine by @mxschmitt in #635

Full Changelog: v0.6201.0...v0.6201.1

Don't miss a new playwright-go release

NewReleases is sending notifications on new releases.