sincecutoff.com

What changed in Playwright.

We scan this tool’s changelog a few times a day and keep the changes that would alter your agent’s next action: 52 since April 2026, each linked to its source.

YOUR MODEL or

Playwright

libraryplaywright

Changes

INTRODUCED
52 CHANGES
LATEST 2026-10-07 · 1 TOOLS
OCT 072026

Playwright API request contexts gain cookie management

When API-level tests need request-context cookie control, use `addCookies()` to add cookies, `cookies()` to inspect them, and `clearCookies()` to remove them.

await request.addCookies([{ name: 'session-id', value: '42', url: 'https://example.com' }]); console.log(await request.cookies('https://example.com')); await request.clearCookies({ name: 'session-id' });
evidence github.comscore 0.98open card ↗
OCT 072026

Playwright locator scoping with `locator.within()`

When an element must be located relative to a dialog or separately within each matching parent, combine existing locators with `locator.within()` and perform the action on the result.

const saveButton = page.getByRole('button', { name: 'Save' }); const dialog = page.getByTestId('settings-dialog'); await saveButton.within(dialog).click();
evidence github.comscore 0.99open card ↗
OCT 072026

Playwright page and frame content can include open shadow roots

When serializing page or frame HTML and you need open shadow roots, call `content({ includeShadow: true })`; Playwright emits them as declarative shadow DOM, and closed roots are never included.

const html = await page.content({ includeShadow: true });
evidence github.comscore 0.92open card ↗
OCT 072026

Playwright screenshot assertions can store unnamed screenshots as WebP

When you want unnamed `toHaveScreenshot` snapshots stored as WebP, set `expect.toHaveScreenshot.type` to `'webp'` in the Playwright test configuration.

export default defineConfig({ expect: { toHaveScreenshot: { type: 'webp' }, }, });
evidence github.comscore 0.97open card ↗
OCT 072026

Playwright test groups can configure test locks

When tests in a file or group access a shared resource that cannot be used concurrently, add a named lock with `test.describe.configure({ lock: 'user-settings' });`. Tests sharing that lock will not run at the same time.

test.describe.configure({ lock: 'user-settings' });
evidence github.comscore 0.93open card ↗
OCT 072026

Playwright test runner selects default projects with `testProject.default`

When a project should stay configured but be skipped by a plain test run, set `default: false`; run it with `--project=<name>` or select all projects with `--project="*"`.

npx playwright test
evidence github.comscore 0.99open card ↗
OCT 072026

Playwright test runner shuffles test order with a reproducible seed

When investigating tests that may depend on execution order, run the suite with `--shuffle` to randomize its order. Re-run with the emitted seed to reproduce that order.

npx playwright test --shuffle
evidence github.comscore 0.98open card ↗
OCT 072026

Playwright video recording adds frame-rate and CSS action styling options

When configuring Playwright video recordings, set `video.fps` and `video.show.actions.style` to choose the frame rate and CSS for the point, highlight, and title. Firefox and WebKit capture up to 25 fps; `style` replaces deprecated `fontSize`.

import { defineConfig } from '@playwright/test'; export default defineConfig({ use: { video: { mode: 'on', fps: 60, show: { actions: { style: { point: 'width: 20px; height: 20px; border-radius: 50%; background: red', highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)', title: 'font-size: 16px', }, }, }, }, }, });
evidence github.comscore 0.95open card ↗
SEP 042026

APIRequestContext request methods type JSON responses

For a typed API request in Playwright v1.63.0 or later, pass the response type to `request.get<T>(url)` and use `response.json()` as `T`.

const response = await request.get<User>('/api/users/42'); const user = await response.json();
evidence github.comscore 0.98open card ↗
SEP 042026

Browser.newContext() accepts multiple HTTP credentials

When browser tests need different HTTP credentials by request origin, pass an array of credential objects to `browser.newContext({ httpCredentials })`. The first entry matching the request origin is used; an entry without `origin` matches any request.

const context = await browser.newContext({ httpCredentials: [ { username: "<user-1>", password: "<password-1>", origin: "https://<host-1>:<port>" }, { username: "<user-2>", password: "<password-2>", origin: "https://<host-2>:<port>" }, ], });
evidence github.comscore 0.95open card ↗