Playwright v1.60 Turns Test Failures Into Evidence

Published: · 5 min read

Playwright v1.60 adds scoped HAR recording, locator.drop(), ARIA boxes, and test.abort() so CI failures carry better proof.

Playwright v1.60: HAR, Drop API, and ARIA Boxes

TL;DR

Playwright v1.60 makes failure evidence easier to capture during the run.

The main change is scoped HAR recording.

HAR means network request file.

It shows what the browser sent and received.

The release also adds file drops, ARIA boxes, and hard test aborts.

ARIA means accessibility map.

Together, these changes help CI failures explain themselves.

CI means automated build server.

The Release

Playwright v1.60 shipped on May 11, 2026.

The headline change is context.tracing.startHar().

Tracing means run evidence capture.

Before v1.60, HAR capture lived outside that tracing flow.

Now HAR recording sits next to other test proof.

The API also returns a Disposable.

A disposable is a cleanup handle.

You can use await using to close the HAR automatically.

That matters when many tests run at once.

Manual cleanup breaks easily.

One missed cleanup step can leave broken evidence behind.

Why This Matters For QA Teams

Most teams collect proof after a test fails.

That is too late.

The failing run is already gone.

The next run may pass.

Now the team has a guess, not proof.

Playwright v1.60 moves more proof into the first run.

That is the architectural part.

You are not asking a person to rerun the test.

You are designing the run to bring receipts.

That matters even more for AI testing.

AI means software that predicts.

Predictions need clear input.

A trace, a HAR file, and an ARIA snapshot give that input.

Without proof, AI just writes a confident guess.

How To Use Scoped HAR Recording

This example records network evidence for an upload test.

It also uses the new Drop API.

Drop API means file drop simulation.

import { test, expect } from '@playwright/test';

test('upload records network evidence', async ({ context }) => {
  await using har = await context.tracing.startHar('upload.har', {
    content: 'embed',
    mode: 'minimal',
    urlFilter: /\/api\/upload/,
  });

  const page = await context.newPage();
  await page.goto('/upload');

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

  await expect(page.getByText('Upload complete')).toBeVisible();
});

The HAR starts before the page opens.

The urlFilter keeps the capture focused.

The drop step sends an in-memory file.

When the test scope ends, Playwright finalizes the HAR.

No extra afterEach block is needed.

No custom try/finally block is needed.

That is the small win.

The bigger win is trust.

When upload fails, the HAR file shows the request.

Your team can inspect the failed run.

They do not need to recreate it from memory.

The Hidden Updates Worth Watching

The release is bigger than HAR.

Five smaller changes point in the same direction.

First, locator.drop() tests real upload zones better.

It accepts files, text, HTML, or URI data.

URI means web address.

Playwright sends dragenter, dragover, and drop events.

If the app rejects the drop, the method throws.

That is useful.

It tells you the app never accepted the file.

Second, ARIA snapshots can include boxes.

Boxes mean element positions.

The format is [box=x,y,width,height].

Coordinates are viewport-relative CSS pixels.

Viewport means visible browser area.

This gives AI tools a cleaner page map.

They can see what exists and where it sits.

Third, page-level ARIA assertions now exist.

You can assert the page body directly.

That removes one small wrapper step.

Small wrapper steps matter in generated tests.

Fourth, test.abort() stops bad runs early.

It works inside fixtures, hooks, and route handlers.

Fixtures mean shared test setup.

Use it when the test breaks a safety rule.

For example, a test might publish to a shared page.

That run should stop right away.

Fifth, BrowserContext now mirrors page events.

BrowserContext means a browser sandbox.

Framework owners can listen once per context.

They do not need listeners on every page.

That helps when one test opens many tabs.

The Gotcha Nobody Is Talking About

Only one HAR recording can run per BrowserContext.

That is not a problem.

But it is a design rule.

Do not start one HAR for login and another for upload.

Use separate contexts when you need separate captures.

Or keep one capture narrow with urlFilter.

The Drop API has another useful edge.

If dragover does not call preventDefault(), Playwright throws.

That sounds annoying.

It is usually the bug.

The app rejected the drop before the file arrived.

ARIA boxes have one more boundary.

They use viewport coordinates, not full-page coordinates.

If your test scrolls, account for that.

If your page uses frames, account for that too.

Migration Notes

Playwright v1.60 removes several old APIs.

Check these before upgrading a large suite.

  • Replace Locator.ariaRef() with locator.ariaSnapshot().
  • Remove the handle option from exposeBinding() calls.
  • Remove the logger option from browser connection calls.
  • Replace videosPath and videoSize with recordVideo.

There is also a CDP update.

CDP means browser control protocol.

connectOverCDP() now accepts noDefaults.

That matters when attaching to an existing Chromium browser.

Chromium means Chrome browser engine.

With noDefaults: true, Playwright leaves default context settings alone.

What This Changes In CI

This release does not make tests smarter by itself.

It makes test runs easier to review.

That is the part I care about.

Good QA architecture is not just more tests.

It is better evidence from each run.

For a small suite, v1.60 is a nice upgrade.

For a large CI suite, it is more important.

You can scope network captures.

You can test upload zones without custom browser hacks.

You can give AI tools page structure and element positions.

You can stop unsafe tests before they poison shared state.

That is not hype.

That is how test systems become reviewable.

Verdict

I would upgrade Playwright test projects to v1.60 this week.

Start with the evidence APIs.

Add startHar() where network failures waste review time.

Add locator.drop() where upload tests use custom events.

Add ARIA boxes where AI tools inspect pages.

Then review the breaking removals before merging.

The release is not about one huge feature.

It is about a better proof layer.

That is what AI QA architecture needs.


Related reads on anton.qa:

  • AI Test Automation Architecture: The 3-Layer System
  • Playwright release notes coverage from Anton's content plan

Official sources:


Anton Gulin is the AI QA Architect — the first person to claim this title on LinkedIn. He builds AI-powered test automation systems where AI agents and human engineers collaborate on quality. Former Apple SDET (Apple.com / Apple Card pre-release testing). Find him at anton.qa or on LinkedIn.

playwright · test-automation · ci · ai-qa

Subscribe

Get notified when I publish something new, and unsubscribe at any time.

Related articles

Read all my blog posts

·4 min read

AI Test Automation Architecture: The 3-Layer System

AI Test Automation Architecture: The 3-Layer System AI test automation architecture is the system that tells AI what to test. It also defines how to run tests and prove the result. I split it into three layers: orchestration, execution, and evidence. Without all three, AI testing becomes prompt output with no production gate.

 AI Test Automation Architecture: The 3-Layer System