---
next_cursor: eyJzY29yZSI6MCwic2VxIjo0NjQsInNpbmNlIjpudWxsLCJ0b29sIjoicGxheXdyaWdodCIsInYiOjF9
has_more: true
next: https://sincecutoff.com/v1/changes.md?tool=playwright&score=0&cursor=eyJzY29yZSI6MCwic2VxIjo0NjQsInNpbmNlIjpudWxsLCJ0b29sIjoicGxheXdyaWdodCIsInYiOjF9
items: 10
---
# sincecutoff.com changes: playwright

## Playwright aria snapshots support page capture and locator depth and mode options (playwright, 2026-04-01)
Published 2026-10-13
- slug: playwright-aria-snapshots-support-page-capture-and-locator-depth-and-mode-option-f41d0bd55096
- score: 0.96

How to use it:

When inspecting accessible structure in browser tests, capture a page snapshot with `page.ariaSnapshot()` or call `locator.ariaSnapshot({ depth, mode })` to limit snapshot depth or choose its mode.

Examples:

```
const snapshot = await page.ariaSnapshot();
```

```
const snapshot = await locator.ariaSnapshot({ depth: <depth>, mode: '<default-or-ai>' });
```

- why_it_matters: When inspecting accessible structure in browser tests, capture a page snapshot or set snapshot depth and mode on a locator.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.59.0>, <https://playwright.dev/docs/api/class-page#page-aria-snapshot>, <https://playwright.dev/docs/api/class-locator#locator-aria-snapshot>
- gotchas: "Version: v1.59.0"; "depth: Number; when specified, limits snapshot depth."; "mode: `\"ai\"` returns an AI-optimized snapshot; `\"default\"` is the default mode. The modes are alternatives."; "`page.ariaSnapshot()` is equivalent to `page.locator('body').ariaSnapshot()`."; "Docs conflict: Current API docs show `page.ariaSnapshot()` added in v1.59 and locator `depth`/`mode` added in v1.59; docs also describe features added in later versions, which are omitted here."

## Playwright browser.bind() lets CLI and other clients connect to a launched browser (playwright, 2026-04-01)
Published 2026-10-13
- slug: playwright-browser-bind-lets-cli-and-other-clients-connect-to-a-launched-browser-6c03d7bb9873
- score: 0.98

How to use it:

When inspecting a launched browser session, bind it with a name, then attach a client using that name or the returned endpoint. Use `host` and `port` to bind over WebSocket; call `browser.unbind()` to stop accepting connections.

Examples:

```
const { endpoint } = await browser.bind('my-session', { workspaceDir: '<project-dir>' });
// In another terminal:
playwright-cli attach my-session
playwright-cli -s=my-session snapshot
```

```
const { endpoint } = await browser.bind('my-session', { host: 'localhost', port: 0 });
const client = await chromium.connect(endpoint);
```

```
@playwright/mcp --endpoint=my-session
```

- why_it_matters: When debugging or inspecting a repository's browser session from a coding agent, bind the launched browser and connect a client to it.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.59.0>, <https://playwright.dev/docs/api/class-browser>, <https://playwright.dev/docs/api/class-browsertype>
- gotchas: "Version: v1.59.0"; "title (required): Browser server name used for identification."; "workspaceDir: Working directory associated with the browser server."; "host: When specified, creates a WebSocket server instead of a named pipe."; "port: WebSocket port; `0` lets the OS choose an available port."; "endpoint (required): WebSocket endpoint string passed to `chromium.connect(endpoint)`."; "browser.unbind(): Unbinds the browser server previously bound with `browser.bind()`."; "Prerequisite: `browser.bind()` and `browser.unbind()` were added in Playwright v1.59."; "Prerequisite: The connecting Playwright instance’s major and minor versions must match the version that launched the browser."; "Multiple clients at a time are supported."; "Binding over WebSocket uses `host` and `port` options instead of a named pipe."

## Playwright browserType.launch() accepts artifactsDir (playwright, 2026-04-01)
Published 2026-10-13
- slug: playwright-browsertype-launch-accepts-artifactsdir-63a9530b3817
- score: 0.97

How to use it:

When launching a browser and you want artifacts saved to a specific directory, pass `artifactsDir` in `browserType.launch()` options.

Examples:

```
const browser = await chromium.launch({ artifactsDir: '<artifacts-directory>' });
```

- why_it_matters: When launching a browser for a repository test run, set the directory used for artifacts.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.59.0>, <https://playwright.dev/docs/api/class-browsertype#browser-type-launch>
- gotchas: "Version: v1.59.0"; "options.artifactsDir: Directory for artifacts such as traces, videos, downloads, and HAR files. It is not cleaned up when the browser closes; without it, Playwright uses a temporary directory that is cleaned up on close."

## Playwright page.consoleMessages() and page.pageErrors() accept a filter option (playwright, 2026-04-01)
Published 2026-10-13
- slug: playwright-page-consolemessages-and-page-pageerrors-accept-a-filter-option-0e11d98701a7
- score: 0.95

How to use it:

When a browser test retrieves console messages or page errors, pass `filter` in the options object to control which entries are returned.

Examples:

```
await page.consoleMessages({ filter: 'since-navigation' });
```

```
await page.pageErrors({ filter: 'since-navigation' });
```

- why_it_matters: When retrieving console messages or page errors in a browser test, filter the returned entries.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.59.0>, <https://playwright.dev/docs/api/class-page#page-console-messages>, <https://playwright.dev/docs/api/class-page#page-page-errors>
- gotchas: "Version: v1.59.0"; "filter: Optional value: `all` or `since-navigation`. Controls which messages or errors are returned; the docs do not define the individual values' behavior."; "Prerequisite: The filter option was added in Playwright v1.59."

## Playwright page.screencast records videos, streams frames and manages annotations (playwright, 2026-04-01)
Published 2026-10-13
- slug: playwright-page-screencast-records-videos-streams-frames-and-manages-annotations-00eb8f27722c
- score: 0.93

How to use it:

When preparing browser workflow evidence, record activity or capture JPEG frames with `page.screencast.start()` and finish with `page.screencast.stop()`; add action annotations or overlays as needed. In Playwright Test fixtures, configure annotations under the `video` option.

Examples:

```
await page.screencast.start({ path: 'video.webm', size: { width: 1280, height: 800 } });
// ... perform actions ...
await page.screencast.stop();
```

```
await page.screencast.start({
  onFrame: ({ data, timestamp, viewportWidth, viewportHeight }) => {
    processFrame(data, timestamp, viewportWidth, viewportHeight);
  },
  size: { width: 800, height: 600 },
});
// ... perform actions ...
await page.screencast.stop();
```

```
await page.screencast.start({ path: 'video.webm' });
await page.screencast.showActions({ position: 'top-right' });
await page.screencast.showChapter('Verification', { description: 'Browser workflow evidence' });
// ... perform actions ...
await page.screencast.stop();
```

- why_it_matters: When verifying a repository's browser workflow and preparing evidence for review, record the page activity with annotations or capture frames for processing.
- before: The v1.59 release note describes `page.screencast.start()` and `stop()` as an alternative to the `recordVideo` browser-context option.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.59.0>, <https://playwright.dev/docs/api/class-screencast>
- gotchas: "Version: v1.59.0"; "start({ path }): `path` is optional; when supplied, starts recording to that file. `size` optionally sets maximum frame width and height; `onFrame` optionally receives JPEG frame data and viewport dimensions."; "showActions({ position, duration, fontSize }): All options are optional. `position` selects the title overlay position; `duration` sets annotation display time in milliseconds (default 500); `fontSize` sets title size in pixels (default 24). Returns a disposable that stops annotations when disposed."; "showChapter(title, { description, duration }) (required): `title` is required. `description` and `duration` are optional; duration is milliseconds and defaults to 2000."; "showOverlay(html, { duration }) (required): `html` is required. Optional `duration` is milliseconds; without it, the overlay stays until dismissed or disposed."; "video.show.actions.position: In the Playwright Test `video` option, `show.actions.position` selects the annotation title position; `show.test.position` selects the test annotation position."; "Prerequisite: The screencast methods are documented as added in Playwright v1.59."; "Prerequisite: For Playwright Test fixture video annotations, configure the `video` option under `use`; the release-note example sets `mode: 'on'`."; "`showActions()` accepts `position` values `'top-left'`, `'top'`, `'top-right'`, `'bottom-left'`, `'bottom'`, and `'bottom-right'`, `duration` in milliseconds per annotation, and `fontSize` in pixels; it returns a disposable to stop showing actions."; "Docs conflict: The current API docs include later additions: `cursor` since v1.61 and `style` since v1.64; they also mark `fontSize` deprecated. Those later changes do not establish v1.59 behavior."

## playwright test --debug=cli attaches coding agents to paused tests (playwright, 2026-04-01)
Published 2026-10-13
- slug: playwright-test-debug-cli-attaches-coding-agents-to-paused-tests-3c4ad7673311
- score: 0.98

How to use it:

When debugging a failing repository test, start it with `--debug=cli`, attach to the emitted session, then step through the paused test with `playwright-cli`.

Examples:

```
npx playwright test --debug=cli
```

```
playwright-cli attach <session>
```

```
playwright-cli --session=<session> step-over
```

- why_it_matters: When debugging a failing repository test, start it in CLI debug mode and attach to inspect and step through the paused test.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.59.0>, <https://playwright.dev/docs/release-notes>, <https://playwright.dev/agent-cli/commands/test-debugging>, <https://playwright.dev/agent-cli/capabilities>, <https://playwright.dev/agent-cli/installation>
- gotchas: "Version: v1.59.0"; "--debug=cli: Runs the test paused at the start and prints debugging instructions."; "<session> (required): The session name emitted by the test runner; pass it to `attach`."; "--session=<session>: Selects the named browser session for a CLI command."; "Prerequisite: Playwright 1.59.0 or newer is needed for `--debug=cli`."; "Prerequisite: If Playwright is already a project dependency, the docs say `playwright-cli` commands can also be run as `npx playwright cli <command>`."

## Playwright ariaSnapshot() can include element bounding boxes (playwright, 2026-05-11)
Published 2026-10-13
- slug: playwright-ariasnapshot-can-include-element-bounding-boxes-c5399393f041
- score: 0.92

How to use it:

When inspecting a page or locator, pass `{ boxes: true }` to `ariaSnapshot()` to append each element’s bounding box as `[box=x,y,width,height]`.

Examples:

```
await page.ariaSnapshot({ boxes: true });
```

```
await page.getByRole('<role>').ariaSnapshot({ boxes: true });
```

- why_it_matters: Include element geometry in an aria snapshot used to inspect a page or locator.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.60.0>, <https://playwright.dev/docs/api/class-page#page-aria-snapshot>, <https://playwright.dev/docs/api/class-locator#locator-aria-snapshot>
- gotchas: "Version: v1.60.0"; "boxes: Boolean option; when true, appends each element’s bounding box to the snapshot. Defaults to false. Coordinates are viewport-relative CSS pixels."; "Prerequisite: Use Playwright v1.60.0 or later; the `boxes` option was added in v1.60."

## Playwright BrowserContext mirrors page lifecycle events (playwright, 2026-05-11)
Published 2026-10-13
- slug: playwright-browsercontext-mirrors-page-lifecycle-events-60080847de41
- score: 0.99

How to use it:

When monitoring lifecycle activity across every page in a browser context, register listeners on the `BrowserContext` for the events you need. Each callback receives a `Download`, `Frame`, or `Page`, as documented for that event.

Examples:

```
context.on('download', download => {});
context.on('frameattached', frame => {});
context.on('framedetached', frame => {});
context.on('framenavigated', frame => {});
context.on('pageclose', page => {});
context.on('pageload', page => {});
```

- why_it_matters: Monitor downloads, frame lifecycle, page closure, and page load across pages in a browser context.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.60.0>, <https://playwright.dev/docs/api/class-browsercontext>
- gotchas: "Version: v1.60.0"; "event name (`download`, `frameattached`, `framedetached`, `framenavigated`, `pageclose`, or `pageload`) (required): Selects which context event to listen for. The events report a download starting, a frame attaching/detaching/navigating, a page closing, or a page's JavaScript `load` event being dispatched, respectively."; "listener callback (`data => {}`) (required): Receives the event data: `Download` for `download`, `Frame` for the three frame events, and `Page` for `pageclose` and `pageload`."; "Prerequisite: Use Playwright v1.60.0 or later; the six context event APIs are documented as added in v1.60."

## Playwright getByRole() matches accessible descriptions (playwright, 2026-05-11)
Published 2026-10-13
- slug: playwright-getbyrole-matches-accessible-descriptions-a2f5ba466ed9
- score: 0.97

How to use it:

When locating an element by role and accessible description, pass `description` in the `getByRole()` options. Playwright v1.60.0 added this option to page, locator, frame, and frame-locator methods.

Examples:

```
await page.getByRole('<role>', { description: '<accessible description>' });
```

```
await locator.getByRole('<role>', { description: '<accessible description>' });
```

```
await frame.getByRole('<role>', { description: '<accessible description>' });
```

- why_it_matters: Locate an element by its role and accessible description in a page, locator, frame, or frame locator.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.60.0>, <https://playwright.dev/docs/api/class-page#page-get-by-role>, <https://playwright.dev/docs/api/class-locator#locator-get-by-role>, <https://playwright.dev/docs/api/class-frame#frame-get-by-role>
- gotchas: "Version: v1.60.0"; "role (required): ARIA role to locate."; "description: String or RegExp matching the accessible description. String matching is case-insensitive substring matching by default."; "exact: Match the name and description exactly, case-sensitively and as whole strings; defaults to false. Ignored for RegExp values."; "Prerequisite: Use Playwright v1.60.0 or later for the `description` option."

## Playwright locator.drop() simulates external drag-and-drop (playwright, 2026-05-11)
Published 2026-10-13
- slug: playwright-locator-drop-simulates-external-drag-and-drop-8cb857962ef8
- score: 0.98

How to use it:

When testing an element that accepts external file or clipboard-like drops, call `locator.drop()` with a `files` payload, a MIME-type-to-string `data` map, or both.

Examples:

```
await page.locator('<dropzone-selector>').drop({ files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') } });
```

```
await page.locator('<dropzone-selector>').drop({ data: { 'text/plain': 'hello world', 'text/uri-list': 'https://example.com' } });
```

- why_it_matters: Test a page's file upload zone or other drag-and-drop target.
- sources: <https://github.com/microsoft/playwright/releases/tag/v1.60.0>, <https://playwright.dev/docs/api/class-locator#locator-drop>
- gotchas: "Version: v1.60.0"; "payload.files: File paths or in-memory buffers; file objects use `name` (file name), `mimeType` (file type), and `buffer` (file content)."; "payload.data: MIME-type-to-string map for clipboard-like content; may be used with `files` or by itself."; "options.position: Target point relative to the element’s padding-box top-left; defaults to a visible point."; "options.timeout: Maximum time in milliseconds; defaults to 0 (no timeout)."; "Prerequisite: `locator.drop()` was added in Playwright v1.60."; "Works cross-browser."

Next: https://sincecutoff.com/v1/changes.md?tool=playwright&score=0&cursor=eyJzY29yZSI6MCwic2VxIjo0NjQsInNpbmNlIjpudWxsLCJ0b29sIjoicGxheXdyaWdodCIsInYiOjF9
Save `next_cursor`; next visit, pass it to get only what was published since.
<!-- end of page -->
