Skip to content

chore: roll to Playwright v1.64.1 - #645

Merged
mxschmitt merged 6 commits into
mxschmitt:mainfrom
zacker150:roll/v1.64.1
Nov 4, 2026
Merged

mxschmitt merged 6 commits into
mxschmitt:mainfrom
zacker150:roll/v1.64.1

Conversation

@zacker150

@zacker150 zacker150 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Rolls the bundled driver from v1.62.1 to v1.64.1 and ports the v1.63 and v1.64 client surface, using the Python, Java and .NET v1.63 rolls and the Python, Java (WebMCP) and .NET v1.64 rolls as cross-binding references.

Bundled browsers move to Chromium 156.0.8078.4, Firefox 157.0 and WebKit 27.2. The Chromium update picks up the fix for CVE-2026-79219 (fixed in Chrome 152.0.7977.65); v1.62.1 bundles Chromium 151.0.7922.34.

New APIs

v1.63:

  • Page.FrameLocator() and Frame.FrameLocator() without a selector search any frame. First, Last and Nth on such a frame locator report an error from every locator built from it.
  • Locator.Visible().
  • Page.OnDialogClosed and BrowserContext.OnDialogClosed ("dialogclosed" event).
  • HttpCredentialsList context option (Browser, BrowserType and APIRequest), for different credentials per origin. A non-empty list takes precedence over HttpCredentials, which is unchanged.
  • Opfs option on BrowserContext.StorageState and APIRequestContext.StorageState; the returned Origin carries the entries as Opfs []OPFSEntry, so they round-trip through ToOptionalStorageState.
  • AriaSnapshots and ScreenSnapshots options on Tracing.Start.

v1.64:

  • APIRequestContext.AddCookies, Cookies and ClearCookies.
  • Locator.Within, Page.GetByRef.
  • IncludeShadow option on Page.Content and Frame.Content.
  • Page.WebMCP() and Frame.WebMCP() with WebMCP.Tools and WebMCP.CallTool (WebMCPTool, WebMCPToolAnnotations).
  • RecordVideo.Fps, ScreencastStartOptions.Fps, and Style (ScreencastActionStyle) for screencast and video actions.
  • SignCount on VirtualCredential and CredentialsCreateOptions.

Tracing.Start and Tracing.StartChunk return a Disposable upstream; the Go generator maps Disposable returns to no value, so their Go signatures are unchanged.

Protocol changes ported

  • Protocol call ids are strings (<prefix>@<n>, with a random four-letter prefix per connection). The driver validates addStackToTracingNoReply call ids as strings, so trace stack frames depend on this.
  • httpCredentials is always sent as a list.
  • tracingStart options are sent as snapshotDom, snapshotAria, snapshotScreen and screencast.
  • resolveSelector returns resolvedSelector, which Locator.Normalize now reads.
  • dialogClosed is subscribed through updateSubscription on pages and contexts.

Fixes found while porting sibling tests

  • Locator assertion errors include the driver's customErrorMessage, for example frameLocator() matched elements in multiple frames.
  • StorageStatePath (Browser and APIRequest) sends the file's JSON as is, like SetStorageState, so IndexedDB and OPFS entries in the file reach the driver.
  • Screencast.Start with Path keeps the returned artifact, so Stop saves the video.
  • The traces dir and tracing stack counter also apply to BrowserContext.Request().Tracing().
  • remapMapToStruct fills any fields instead of panicking (needed for WebMCPTool.InputSchema).
  • The bundled Node.js runtime moves to 24.21.0, matching the Python v1.63 roll.
  • Locators derived from a locator that carries an error (First, Last, Nth, Filter, Visible, Locator, Describe, And, Or, Has/HasNot, ContentFrame, FrameLocator) keep that error. This also covers the existing errors for unsupported GetBy* arguments.

Patch and generation notes

  • patches/main.patch adds go to the v1.63 Tracing.start options (snapshots, ariaSnapshots, screenSnapshots), which v1.63 gates by language.
  • Go-only context-option-httpcredentials-go and context-option-httpcredentials-list-go params keep the HttpCredentials struct and add the list option.
  • signCount is added to the storage-state credential blocks, matching the protocol's VirtualCredential, so storage state keeps using VirtualCredential and round-trips the counter.
  • opfs (path, type, base64) is added to the Go storage-state origin blocks, and the generator maps it to OPFSEntry.
  • Generator name mappings: HttpCredentialsList elements use HttpCredentials, WebMCPTool, WebMCPToolAnnotations and ScreencastActionStyle use the documented aliases, and WebMCP() is a getter without an error.
  • Re-running go generate ./... from the committed state produced no generated Go diff; it updated only the README browser versions, which are included.

Not ported

  • Locator.ariaSnapshotJSON / Page.ariaSnapshotJSON (langs: js, skipped by all siblings).
  • Disposable returns from Tracing.Start / StartChunk and their tests (see above).
  • Locator toString() / locator-code tests (Normalize locator code, description); the Go Locator has no string form.
  • Java and .NET client fixes for tracing recovery after a failed Stop and for closing a context when saving its HAR fails, with their tests. Python did not port these either.

Validation

  • gofumpt -l .: clean
  • golangci-lint run ./... (v2.15.0, the version CI's version: latest resolves to): 0 issues. v2.15.0 newly flags three existing discarded channel receives (route.go and tests/browser_context_close_race_test.go), now marked //nolint:errcheck.
  • go build ./..., go vet ./...: passed
  • go generate ./... from a clean v1.64.1 submodule: no generated Go diff
  • bash .claude/skills/roll-playwright/verify-parity.sh 1.64.1: no new v1.64 API without go. For 1.63.0 the only item is ariaSnapshotJSON (langs: js).
  • BROWSER=chromium go test -race -count=1 -timeout=15m -v ./...: passed (733 passed, 6 skipped)
  • BROWSER=webkit go test -race -count=1 -v ./...: passed (711 passed, 25 skipped) on 2cdee20; after the later fixes, the affected security-details, storage-state/OPFS and locator/frame-locator tests were rerun and pass
  • BROWSER=firefox go test -race -count=1 -timeout=15m -v ./tests/: passed (637 passed, 14 skipped) on 2cdee20; the same affected tests were rerun after the later fixes and pass. Run with CI's 15m timeout because the default 10m timeout expired on Firefox; the root package passed in the earlier ./... run.
  • Linux only. macOS, Windows and the examples job were not run locally.

🤖 Generated with Claude Code


🤖 Rolled with the roll-playwright skill.
Sibling references used: python microsoft/playwright-python#3198 and microsoft/playwright-python#3237, java microsoft/playwright-java#1972, microsoft/playwright-java#2001 and microsoft/playwright-java#2002, dotnet microsoft/playwright-dotnet#3359 and microsoft/playwright-dotnet#3376
verify-parity.sh (Step 9): bucket 1 clean for v1.64; for v1.63 only ariaSnapshotJSON (langs: js, skipped by all siblings). Bucket 2 printed only the python v1.64.1 version-bump PR, so the sibling tests were enumerated by hand from the PRs above.

Roll the driver from v1.62.1 to v1.64.1 (Chromium 156.0.8078.4, Firefox
157.0, WebKit 27.2) and port the v1.63 and v1.64 client surface.

Protocol changes: protocol call ids are strings, httpCredentials is sent
as a list, the tracingStart snapshot params are renamed, and
resolveSelector returns resolvedSelector.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T09:22:16.538004Z 1371a43 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zacker150
zacker150 marked this pull request as draft November 4, 2026 07:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cdee20e02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread browser_context.go
var path *string
if len(options) == 1 {
params["indexedDB"] = options[0].IndexedDB
params["opfs"] = options[0].Opfs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve OPFS entries in the returned storage-state model

Without a Path, calling StorageState with Opfs: Bool(true) returns no OPFS contents: both storage-state methods remap the driver response into StorageState, whose Origin type still contains only Origin and LocalStorage. Consequently, passing state.ToOptionalStorageState() to NewContext silently restores none of the requested files, even though the file-backed path passes the new tests. Preserve origins[].opfs in the generated model and its codegen input so the returned state can round-trip too.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[claude-opus-5-5] Responding on behalf of zacker150


Fixed in 27fdc27: the returned Origin now carries Opfs []OPFSEntry (patch + generator), and a new test restores OPFS through ToOptionalStorageState() into NewContext.

Comment thread frame_locator.go
Comment on lines +35 to +36
if fl.frameSelector == anyFrameSelector {
return &frameLocatorImpl{frame: fl.frame, frameSelector: fl.frameSelector, err: errors.Join(fl.err, errNthFrameOnAnyFrame)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve deferred frame-selection errors through locator composition

With only one matching frame, page.FrameLocator().First().Locator("button").First().Click() can succeed instead of reporting that selecting the first frame is unsupported. This branch records the rejection solely in err while retaining a valid any-frame selector, but locatorImpl.First() (also Filter and Locator) rebuilds through newLocator and drops that error. Propagate the newly deferred frame-locator error through derived locators, and cover a chained locator action rather than only the immediate Count().

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[claude-opus-5-5] Responding on behalf of zacker150


Fixed in 09a0852: every derived locator (First/Last/Nth/Filter/Visible/Locator/Describe/And/Or/Has/HasNot/ContentFrame/FrameLocator) now keeps the receiver's error, and the existing GetBy* argument errors too. New tests cover 16 chained cases, including yours.

zacker150 and others added 5 commits November 4, 2026 07:22
golangci-lint v2.15.0 reports discarded receives from error channels.
Mark the three existing ones as intentional.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebKit 27.2 on Windows reports the real certificate subject in response
security details, as Playwright v1.64.1's own suite expects
(tests/library/har.spec.ts). Assert the httptest subject on every
platform and skip only the protocol check on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StorageState(Opfs: true) returned a StorageState whose Origin model had
no opfs field, so OPFS entries were dropped unless the state was saved
to a file. The patch documents origins[].opfs for the Go storage-state
types, and the generator maps it to OPFSEntry, so the returned value
round-trips through ToOptionalStorageState into NewContext.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A locator that carries an error, such as one built from an any-frame
FrameLocator after First, Last or Nth, or from a GetBy* call with an
unsupported argument, lost that error when another locator was derived
from it. First, Last, Nth, Filter, Visible, Locator, Describe, And, Or,
Has/HasNot, ContentFrame and FrameLocator rebuilt the locator without
it, so page.FrameLocator().First().Locator("button").First().Click()
clicked when a single frame matched. Derived locators now keep the
receiver's and operands' errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebKit on macOS summarizes httptest's certificate by its first DNS name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zacker150
zacker150 marked this pull request as ready for review November 4, 2026 09:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1371a43bda

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frame_locator.go Resolved
@mxschmitt
mxschmitt merged commit f7cabe5 into mxschmitt:main Nov 4, 2026
22 checks passed
@mxschmitt

Copy link
Copy Markdown
Owner

Thank you!

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