Playwright 1.61: Passkeys, Web Storage, and Testing Features
Playwright 1.61 · June 2026

Playwright 1.61:
Passkeys, Web Storage, and New Testing Features

Technical overview of the most significant release in Playwright's 2026 roadmap — virtual passkey authentication, native Web Storage API access, and a substantially improved test runner.

Oleg Maximov June 21, 2026 10 min read

Introduction

Playwright 1.61, released on June 15, 2026, is one of the most impactful updates to the popular browser automation framework this year. The release tackles three areas that directly affect how teams write and maintain E2E tests: WebAuthn passkey authentication, Web Storage API utilities, and a major test runner refresh.

If you're maintaining CI pipelines or writing integration tests for applications that use passkeys, localStorage-based state, or complex retry logic — this release changes how you approach each of those tasks. Below I walk through every new feature with working code examples, practical migration notes, and the browser versions shipped with this release.

WebAuthn Passkey Testing

The headline feature in Playwright 1.61 is the virtual authenticator — a built-in WebAuthn credential manager accessible via browserContext.credentials. This is the first time Playwright offers native support for testing passkey registration and authentication flows without external hardware or platform authenticator emulation.

Seeding a Passkey

You can provision a passkey that your backend has already created for a test user. Playwright's virtual authenticator answers navigator.credentials.create() and navigator.credentials.get() calls transparently:

const context = await browser.newContext();

// Seed a passkey your backend provisioned for a test user.
await context.credentials.create('example.com', {
  id: credentialId,
  userHandle,
  privateKey,
  publicKey,
});

await context.credentials.install();

const page = await context.newPage();
await page.goto('https://example.com/login');

// The page's navigator.credentials.get() is answered
// with the seeded passkey.
await page.waitForURL('https://example.com/dashboard');

Capturing a Passkey in Setup Tests

You can also let the application register a passkey naturally during a setup test, read the credential back with credentials.get(), and seed it into subsequent test suites. This enables realistic passkey lifecycle testing — registration in one step, authentication in another — without managing persistent credential state externally.

For full API details, see the Credentials API documentation.

Web Storage API

Playwright 1.61 introduces page.localStorage and page.sessionStorage — direct accessors that let you read and write Web Storage for the current origin without executing JavaScript in the page context.

// Set a token for authentication flows
await page.localStorage.setItem('token', 'abc');

// Read it back
const token = await page.localStorage.getItem('token');

// List all session storage entries
const items = await page.sessionStorage.items();

// Clear specific item
await page.localStorage.removeItem('token');

// Clear all storage
await page.localStorage.clear();

This API is particularly valuable for state injection in test setup. Instead of navigating through a multi-step login flow to set application state, you can inject the necessary tokens and preferences directly into localStorage before the page loads. This reduces test flakiness and speeds up suite execution.

Methods available: setItem(), getItem(), removeItem(), clear(), and items() for both localStorage and sessionStorage.

Enhanced Test Runner

The test runner received several meaningful upgrades in 1.61. These aren't headline-grabbing features, but they improve the developer experience significantly when debugging flaky tests and configuring CI pipelines.

New Video Modes

The testOptions.video option now supports the same granular mode set as trace:

These modes give precise control over disk usage in CI environments. If you only care about what went wrong, retain-on-first-failure saves significant storage compared to recording everything.

expect.soft.poll()

Soft assertions now support polling via expect.soft.poll(...). Like standard soft assertions, these do not immediately fail the test — they collect errors and report them after the test completes. The polling variant is useful for conditions that take time to stabilise, such as async UI updates or server-side state changes. Combined with soft assertions, this allows non-critical checks to verify themselves without blocking execution or causing premature test failures.

fullConfig.argv and fullConfig.failOnFlakyTests

fullConfig.argv provides a snapshot of process.argv from the runner process, making custom CLI arguments passed after the -- separator accessible in configuration files and custom reporters.

fullConfig.failOnFlakyTests mirrors the configuration option of the same name, making it readable inside reporters. This means your custom reporter can explain why a flaky test run failed or surface flaky detection context in CI dashboards.

Network API Improvements

Two new properties on APIResponse mirror their browser-side counterparts:

Browser and Screencast

A new artifactsDir option in browserType.connectOverCDP() controls where artifacts (traces, downloads, screenshots) are stored when Playwright connects to an existing browser instance via the Chrome DevTools Protocol. Previously, artifact paths were harder to control in CDP mode — this change brings parity with the standard launch workflow.

The screencast API also gains a cursor option in screencast.showActions() that displays an on-screen cursor indicator. This is useful for demo recordings and debugging videos where you want viewers to see exactly which element Playwright is interacting with.

Other Improvements

Browser Versions

Playwright 1.61 ships with the latest browser engines:

This version was also tested against Google Chrome 149 and Microsoft Edge 149 stable channels.

FAQ

What is new in Playwright 1.61?
Playwright 1.61 introduces WebAuthn virtual authenticator for passkey testing, Web Storage API for localStorage/sessionStorage test utilities, enhanced test runner with new video modes and expect.soft.poll(), new network APIs (apiResponse.securityDetails() and apiResponse.serverAddr()), artifactsDir option for connectOverCDP(), and Ubuntu 26.04 support.
How do you test WebAuthn passkeys in Playwright 1.61?
Use browserContext.credentials — a virtual authenticator. Call context.credentials.create(origin, {id, userHandle, privateKey, publicKey}) to provision a passkey, then context.credentials.install() to make it available for navigator.credentials.get() calls during your test. You can also capture a passkey in a setup test and reuse it across test suites.
What is the new Web Storage API in Playwright?
Page.localStorage and page.sessionStorage provide direct read/write access to the page's Web Storage for the current origin. Use setItem(), getItem(), removeItem(), clear(), and items() to manipulate storage without executing JavaScript in the page context.
What are the new video mode options in Playwright 1.61?
Three new modes: on-all-retries (record video for all retry attempts), retain-on-first-failure (keep video only for the first failure), and retain-on-failure-and-retries (keep video for first failure plus all retries). These give precise control over CI storage usage.
How does expect.soft.poll() work in Playwright 1.61?
expect.soft.poll() creates a soft assertion that continuously polls a condition until it's met or timeout expires. Soft assertions don't immediately fail the test — they collect errors and report them after the test completes, making them useful for non-critical checks in async scenarios.
What browser versions does Playwright 1.61 ship with?
Playwright 1.61 ships with Chromium 149.0.7827.55, Mozilla Firefox 151.0, and WebKit 26.5. Tested against Google Chrome 149 and Microsoft Edge 149 stable channels.
Does Playwright 1.61 support recording WebSocket traffic?
Yes. HAR and trace recordings now include WebSocket requests. This is critical for debugging real-time applications where WebSocket traffic was previously invisible in trace analysis.

Need Help with E2E Testing?

Setting up robust E2E testing pipelines requires thoughtful architecture — choosing the right tools, structuring test suites for maintainability, and configuring CI for reliable execution. If you're planning an automation strategy or need help migrating to Playwright 1.61, reach out to me for a free consultation.

I'm a full-stack developer with extensive experience building and testing production web applications. Based in Minsk and working worldwide, let's discuss your project.

Contact

Let's discuss your project

Need help with test automation or Playwright migration? Tell me about your project — I'll provide a preliminary estimate. Free of charge.