Repository navigation
chore: roll to Playwright v1.64.1 - #645
Conversation
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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| var path *string | ||
| if len(options) == 1 { | ||
| params["indexedDB"] = options[0].IndexedDB | ||
| params["opfs"] = options[0].Opfs |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
[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.
| if fl.frameSelector == anyFrameSelector { | ||
| return &frameLocatorImpl{frame: fl.frame, frameSelector: fl.frameSelector, err: errors.Join(fl.err, errNthFrameOnAnyFrame)} |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
[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.
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>
There was a problem hiding this comment.
💡 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".
|
Thank you! |
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()andFrame.FrameLocator()without a selector search any frame.First,LastandNthon such a frame locator report an error from every locator built from it.Locator.Visible().Page.OnDialogClosedandBrowserContext.OnDialogClosed("dialogclosed"event).HttpCredentialsListcontext option (Browser, BrowserType and APIRequest), for different credentials per origin. A non-empty list takes precedence overHttpCredentials, which is unchanged.Opfsoption onBrowserContext.StorageStateandAPIRequestContext.StorageState; the returnedOrigincarries the entries asOpfs []OPFSEntry, so they round-trip throughToOptionalStorageState.AriaSnapshotsandScreenSnapshotsoptions onTracing.Start.v1.64:
APIRequestContext.AddCookies,CookiesandClearCookies.Locator.Within,Page.GetByRef.IncludeShadowoption onPage.ContentandFrame.Content.Page.WebMCP()andFrame.WebMCP()withWebMCP.ToolsandWebMCP.CallTool(WebMCPTool,WebMCPToolAnnotations).RecordVideo.Fps,ScreencastStartOptions.Fps, andStyle(ScreencastActionStyle) for screencast and video actions.SignCountonVirtualCredentialandCredentialsCreateOptions.Tracing.StartandTracing.StartChunkreturn aDisposableupstream; the Go generator mapsDisposablereturns to no value, so their Go signatures are unchanged.Protocol changes ported
<prefix>@<n>, with a random four-letter prefix per connection). The driver validatesaddStackToTracingNoReplycall ids as strings, so trace stack frames depend on this.httpCredentialsis always sent as a list.tracingStartoptions are sent assnapshotDom,snapshotAria,snapshotScreenandscreencast.resolveSelectorreturnsresolvedSelector, whichLocator.Normalizenow reads.dialogClosedis subscribed throughupdateSubscriptionon pages and contexts.Fixes found while porting sibling tests
customErrorMessage, for exampleframeLocator() matched elements in multiple frames.StorageStatePath(Browser and APIRequest) sends the file's JSON as is, likeSetStorageState, so IndexedDB and OPFS entries in the file reach the driver.Screencast.StartwithPathkeeps the returned artifact, soStopsaves the video.BrowserContext.Request().Tracing().remapMapToStructfillsanyfields instead of panicking (needed forWebMCPTool.InputSchema).First,Last,Nth,Filter,Visible,Locator,Describe,And,Or,Has/HasNot,ContentFrame,FrameLocator) keep that error. This also covers the existing errors for unsupportedGetBy*arguments.Patch and generation notes
patches/main.patchaddsgoto the v1.63Tracing.startoptions (snapshots,ariaSnapshots,screenSnapshots), which v1.63 gates by language.context-option-httpcredentials-goandcontext-option-httpcredentials-list-goparams keep theHttpCredentialsstruct and add the list option.signCountis added to the storage-state credential blocks, matching the protocol'sVirtualCredential, so storage state keeps usingVirtualCredentialand round-trips the counter.opfs(path,type,base64) is added to the Go storage-state origin blocks, and the generator maps it toOPFSEntry.HttpCredentialsListelements useHttpCredentials,WebMCPTool,WebMCPToolAnnotationsandScreencastActionStyleuse the documented aliases, andWebMCP()is a getter without an error.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).Disposablereturns fromTracing.Start/StartChunkand their tests (see above).toString()/ locator-code tests (Normalizelocator code, description); the GoLocatorhas no string form.Stopand for closing a context when saving its HAR fails, with their tests. Python did not port these either.Validation
gofumpt -l .: cleangolangci-lint run ./...(v2.15.0, the version CI'sversion: latestresolves to): 0 issues. v2.15.0 newly flags three existing discarded channel receives (route.goandtests/browser_context_close_race_test.go), now marked//nolint:errcheck.go build ./...,go vet ./...: passedgo generate ./...from a clean v1.64.1 submodule: no generated Go diffbash .claude/skills/roll-playwright/verify-parity.sh 1.64.1: no new v1.64 API withoutgo. For 1.63.0 the only item isariaSnapshotJSON(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 passBROWSER=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.🤖 Generated with Claude Code
🤖 Rolled with the
roll-playwrightskill.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.