Upgrade to Playwright 1.61.1 - #1
Closed
kruppel wants to merge 4 commits into
Closed
Conversation
kruppelforce-pushed
the
kurt/playwright-1.61.1
branch
3 times, most recently
from
June 26, 2026 02:13
3f5d099 to
8862204Comparekruppel
commented
Jun 26, 2026
| end | ||
| def connect_over_cdp(endpointURL, headers: nil, isLocal: nil, noDefaults: nil, slowMo: nil, timeout: nil, &block) | ||
| def connect_over_cdp(endpointURL, artifactsDir: nil, headers: nil, isLocal: nil, noDefaults: nil, slowMo: nil, timeout: nil, &block) |
OwnerAuthor
There was a problem hiding this comment.
kruppel
commented
Jun 26, 2026
| attr_reader :name, :message, :stack | ||
| attr_reader :name, :message, :stack, :raw_log | ||
| # Error details for `expect` failures (received value, timedOut, customErrorMessage). | ||
| attr_accessor :details |
OwnerAuthor
There was a problem hiding this comment.
The change isn't captured in the release notes, but came from upstream PR #40801 "chore: throw on Frame.expect / Page.expectScreenshot failure".
Here's the difference in the expect protocol across the two versions:
Playwright 1.60.0 — the command returns the result:
exporttypeFrameExpectResult={matches: boolean,received?: {value?: SerializedValue,ariaSnapshot?: string},timedOut?: boolean,errorMessage?: string,log?: string[],};// (no FrameExpectErrorDetails type exists)Playwright 1.61.1 — the result is gone; failure info moved to a reject-path type:
exporttypeFrameExpectResult=void;// ← resolves with NOTHING on a matchexporttypeFrameExpectErrorDetails={// ← NEW; sent on the error/reject pathreceived?: {value?: SerializedValue,ariaSnapshot?: string},timedOut?: boolean,customErrorMessage?: string,};In 1.60, the Ruby client read result['matches'] / ['received'] / ['log'] off the return value. In 1.61, since the command returns void, assertions break as the expect call comes back as {"id":7} (no result), and raises undefined method 'key?' for nil at frame.rb:738.
To resolve the failing test:
detailscarries the newFrameExpectErrorDetails(received/timedOut/customErrorMessage), which now only exists on the error path.raw_logreplaces the oldFrameExpectResult.logfield (the call-log array), which likewise moved off the result and onto the error's wirelog.
Ports Frame#expect to the 1.61 expect protocol: the command now resolves on a successful match and rejects with FrameExpectErrorDetails on mismatch/timeout (upstream microsoft/playwright#40801). Carry errorDetails on Playwright::Error and translate it back into the assertion result hash.
kruppelforce-pushed
the
kurt/playwright-1.61.1
branch
from
June 26, 2026 02:40
8862204 to
cfc42abCompareAdds the 1.61 WebStorage API: page.local_storage / page.session_storage expose the current origin's localStorage / sessionStorage via items, get_item, set_item, remove_item and clear, backed by the page channel's webStorage* commands. Registers WebStorage with the API generator and ports the upstream page-localstorage spec.
Adds the 1.61 WebAuthn API: browser_context.credentials exposes a virtual authenticator scoped to the context, with install, create, get and delete backed by the context channel's credentials* commands. Lets tests seed passkeys and answer navigator.credentials ceremonies without real hardware. Registers Credentials with the API generator, maps the class doc examples, and ports the upstream browsercontext-webauthn spec.
Exposes the 1.61 APIResponse fields: security_details returns the TLS certificate details for HTTPS responses (nil for plain HTTP) and server_addr returns the resolved IP address and port, both read from the fetch response initializer. Ports the upstream global-fetch specs covering these methods.
kruppelforce-pushed
the
kurt/playwright-1.61.1
branch
from
June 26, 2026 02:57
c7b94dc to
f6583cbComparekruppel
marked this pull request as ready for review
June 26, 2026 02:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade playwright-ruby to Playwright 1.61.1.
Key Changes
Frame#expect error handling: Refactored to handle Playwright 1.61+ behavior
expectcommand now resolves on successful match and rejects withFrameExpectErrorDetailson mismatch/timeoutresult['received']to catching::Playwright::Errorexceptions{ 'matches' => !is_not }on success, extracts error details on failureisNotflag and error details from serverError class enhancements: Added support for expect-specific error details
raw_loganddetailsattributes toErrorclasslib/playwright/connection.rbto parse and attacherrorDetailsfrom server messagesAPI coverage documentation: Updated to reflect deprecated/unimplemented features
local_storage,session_storage, andcredentialsas unimplementeddevelopment/api.jsonwith Playwright 1.61.1 schema changesartifactsDirparameter toBrowserType#connect_over_cdp