Playwright 27 ๐ญ Trace Analysis โ Reading zip traces and timeline inspection
A Playwright trace is a recording of everything the browser did during a test: every action, every locator resolution, every network request, every console message, and a DOM snapshot before and after each step. When a test fails in CI and the failure will not reproduce on a laptop, the trace is the artifact that replaces the reproduction, because it lets you step through the failure backwards and forwards in a real browser without re-running anything.
The recording lands on disk as a single .zip file. That zip is not a video and not a log file โ it is a structured archive of JSON-lines event streams plus a directory of content-addressed resources, and the trace viewer is the program that reassembles those streams into a browsable timeline. Understanding what is inside the zip makes the viewer far less mysterious, and it also makes it possible to reach into the archive with unzip and jq when the viewer is not available.
This chapter covers the recording side of traces and the analysis side, in that order. The first sections walk through the config option, the per-test override, and the programmatic tracing.start() / startChunk() API for scripts that are not Playwright Test. The middle sections open the zip: the CLI, the hosted trace.playwright.dev viewer, the HTML report attachment, the VS Code extension, and the exact file layout of the archive. The last sections are about reading a failure โ the actions tree, the timeline and filmstrip, the snapshot pane, the Call / Log / Console / Network / Source / Attachments / Metadata tabs, test.step() grouping, and the search box that filters a five-thousand-event trace down to the twelve that matter.
Key point: A trace is a zip containing trace.trace (an event stream of actions, snapshots, and logs), trace.network (every request and response), trace.stacks, and a resources/ folder of SHA-1-named DOM snapshots; npx playwright show-trace or trace.playwright.dev replays that archive as a scrubbable timeline, and the fastest route from “test failed in CI” to “here is the exact DOM at the moment of failure” is trace: 'on-first-retry' plus the snapshot pane.
Why traces exist
The “it only fails in CI” problem. A test that passes locally and fails on the CI runner has a cause that was stripped by the difference in machine: a slower network, a different timezone, a missing font, a cold CDN, a flaky third-party endpoint. A screenshot shows the final state, which is usually an empty spinner or an error toast โ it tells you the test failed, not why. A trace shows the state before the click, the state during the click, the failed request that preceded it, and the console error that followed.
The screenshot is not enough. A screenshot is a picture of the last paint. It cannot show a button that was present in the DOM but invisible because a parent had opacity: 0, an element that was covered by an overlay, or a layout that shifted between the click and the assertion. The trace captures the DOM itself, not a picture of it, which means you can inspect computed styles, expand the element tree, and see the exact serialized markup the assertion ran against.
The console log is not enough. console.log debugging is a one-way channel: you decide what to print before you know what went wrong. By the time the failure happens in CI, the log you needed is the one you did not write. The trace records the console automatically, along with every network request and every Playwright log line for actionability checks, so the information is there before you knew you needed it.
The retry problem. Playwright Test retries a failing test by default in many CI configurations. If the retry passes, the failure is a flake that you now have no evidence for. trace: 'on-first-retry' solves exactly this: the trace is kept from the attempt that failed, and a retry that passes does not delete the evidence of the attempt that did not.
The sharing problem. A trace is a self-contained file. The CI job uploads it as an artifact; a colleague downloads it and opens it in a browser. There is no agent to install, no remote session to establish, and no environment to reproduce. The DOM snapshots are static HTML plus the CSS and JS resources that were in play at the time, so the trace opens even when the application server is long gone.
The trade-off. Traces are expensive to record and expensive to store. Snapshotting the DOM before and after every action, together with screenshots and network bodies, can add hundreds of milliseconds per action and produce archives in the hundreds of megabytes for a long suite. The tooling is built around that cost: retain-on-failure throws away the trace of a passing test, snapshots / screenshots / sources can be switched off individually, and startChunk / stopChunk lets a script record only the interesting window of a long-lived session.
a. Recording: the config option, the override, and the programmatic API
The config option is the normal path. trace accepts a mode string, and the four modes differ only in when the trace is kept, not in what it contains.
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
retries: process.env.CI ? 2 : 0, // retries are what on-first-retry keys off
use: {
trace: 'on-first-retry', // record every attempt, keep the failed one
},
});
The mode table is short: 'off' records nothing, 'on' records every run and keeps every archive, 'retain-on-failure' records every run and deletes the archive when the test passes, 'on-first-retry' records only from the first retry onwards, and 'on-all-retries' records every retry attempt. For a CI suite, 'on-first-retry' is the default recommendation because it pays the recording cost only on the attempt that needs evidence.
The config also accepts an object form, which is how the expensive parts are switched off for a large suite:
// playwright.config.ts (excerpt)
use: {
trace: {
mode: 'retain-on-failure', // keep only when the test fails
snapshots: true, // DOM snapshots โ the most useful part
screenshots: true, // filmstrip images โ the heaviest part
sources: false, // skip embedding the test source
},
},
Turning screenshots off cuts the archive size dramatically and leaves the timeline, the DOM snapshots, the network log, and the console intact. A trace without screenshots is still fully navigable; you just lose the filmstrip previews.
The per-test override is test.use() inside a file, or the trace option on a single test through the fixture-free form of test.describe.configure. The file-level form is the one that reads well:
// tests/checkout.spec.ts
import { test, expect } from '@playwright/test';
// this file is flaky enough to justify recording every attempt
test.use({ trace: 'on' });
test('completes checkout', async ({ page }) => {
await page.goto('/cart');
await page.getByRole('button', { name: 'Pay' }).click();
await expect(page.getByText('Order confirmed')).toBeVisible();
});
For scripts that do not use Playwright Test at all โ a scraper, a migration script, a smoke check โ the BrowserContext.tracing API is the equivalent. It has a start/stop pair for a single archive and a start/stop chunk pair for recording several archives against one context.
// scripts/scrape.ts
import { chromium } from 'playwright';
const browser = await chromium.launch();
const context = await browser.newContext();
// begin recording; snapshots are what make the trace inspectable
await context.tracing.start({ screenshots: true, snapshots: true });
const page = await context.newPage();
await page.goto('https://example.com/login');
await page.getByLabel('Email').fill('user@example.com');
await page.getByRole('button', { name: 'Sign in' }).click();
// write the whole recording to one archive
await context.tracing.stop({ path: 'trace.zip' });
await browser.close();
The chunk API is for a session that runs for hours and only fails once. Each stopChunk writes a separate archive, so the failure window is isolated instead of buried inside a two-gigabyte recording:
// one context, one login, several recorded windows
await context.tracing.start({ snapshots: true, sources: true });
await page.goto('/dashboard');
await page.getByRole('link', { name: 'Reports' }).click();
await context.tracing.stopChunk({ path: 'trace-navigation.zip' }); // window 1
await page.getByRole('button', { name: 'Export' }).click();
await context.tracing.stopChunk({ path: 'trace-export.zip' }); // window 2
The start() call also accepts name and title, which are displayed in the trace viewer’s metadata and are the cheapest way to label which environment a CI artifact came from.
b. The zip, and the four ways to open it
The archive is a real zip, and its layout is stable enough to depend on:
trace.zip
โโโ trace.trace JSON-lines: action begin/end, logs, snapshots, console
โโโ trace.network JSON-lines: every request, response, and body
โโโ trace.stacks call stacks captured for each action
โโโ resources/ SHA-1 named html, css, js, png, woff files
trace.trace is the spine. Each line is a self-contained JSON event: a before event when an action starts, an after event when it ends, log events emitted during it, and input events for the frame metadata. trace.network is the same JSON-lines format applied to the network, which is why the viewer can show a request that happened between two actions rather than only the requests a test explicitly awaited. resources/ is content-addressed: the snapshot of a page that reuses the same stylesheet ten times stores that stylesheet once, keyed by its SHA-1.
Opening it has four routes. The CLI is the one to know by heart:
# open the archive in the bundled viewer
npx playwright show-trace trace.zip
# bind to a specific interface so a colleague on the network can open it
npx playwright show-trace --host 0.0.0.0 --port 9323 trace.zip
The hosted viewer at trace.playwright.dev takes the same file by drag and drop. It runs entirely in the browser โ the archive is parsed locally by a service worker and never uploaded โ which makes it the safe way to share a trace with someone who does not have the repo checked out. There is no account, no upload, and no retention.
The HTML reporter is the third route, and it is the one that scales to a whole CI run. When trace is set, each test’s archive is attached to the report, and the failing test’s row in the report gets a “Trace” link that opens the viewer with the archive preloaded. The report is a folder of static files, so a zipped report artifact opened from disk still links straight into the traces it carries.
The fourth route is the VS Code extension, which surfaces the trace from the Test Explorer tree and opens it in a webview beside the editor. This is the fastest loop when you are running a single test in watch mode, because the trace and the test file sit side by side.
A fifth, smaller route is worth knowing for merged reports. When a suite is sharded across several CI machines, npx playwright merge-reports combines the blob reports into one HTML report, and the merged report carries the traces from every shard. The archives inside are the same format; only their file names gain a shard prefix.
c. The viewer: actions tree, timeline, snapshot, and the eight tabs
The viewer has four regions, and each answers a different question.
The actions tree on the left is the call list, in order, nested by test.step() and by describe. Each node is one Playwright action โ page.goto, locator.click, expect.toBeVisible โ with its duration and a status icon. This is the “what happened” view. Arrow keys move the selection, which moves every other pane with it.
The timeline along the top is the “when” view. It shows each action as a bar against wall-clock time, the network requests as their own row, and console messages as markers on a third row. Above the bars is the filmstrip, a strip of screenshots taken around each action. Dragging across the timeline zooms it; clicking a point moves the snapshot pane to that exact moment rather than to the nearest action boundary, which is how you catch a state that existed for 200 milliseconds between two actions.
The snapshot pane in the middle is the “what did the page look like” view. It is not an image. It is the serialized DOM rendered inside an iframe with the original stylesheets, so you can expand the element tree, select a node, and read the computed styles. The before and after snapshots of the selected action are toggled with the two buttons above the pane, and the difference between them is usually the entire bug.
The tab panel at the bottom has eight tabs, and knowing which one to reach for is most of trace analysis:
| Tab | What it answers |
|---|---|
| Call | The action’s name, parameters, and total duration |
| Log | Every Playwright log line during the action, including actionability checks |
| Errors | The page errors and uncaught exceptions raised during the action |
| Console | Everything the page logged, with source location and severity |
| Network | Every request and response, with headers, status, and timing |
| Source | The test source line that produced the action |
| Attachments | Files attached with testInfo.attach() |
| Metadata | Browser, viewport, platform, and trace start time |
The Log tab deserves special mention because it is where the actionability checks are recorded. When a click fails because the element was covered, the log shows the sequence โ waiting for the element to be visible, waiting for it to be stable, waiting for it to receive pointer events โ and the line where the wait timed out, along with the element that was actually hit-testing at that point. That is information a screenshot physically cannot carry.
The Source tab only has content when sources is enabled at record time, and it highlights the exact line in the test file that produced the action. In a trace taken from a CI run on a different commit, that highlighted line is the fastest way to confirm the artifact matches the code you are reading.
The search box above the actions tree filters by action name, by selector, by URL, and by any text in the log. The regex toggle next to it turns the box into a pattern matcher, which is how you jump to the one POST /api/checkout among four hundred requests.
d. Reading a failure: the workflow
The workflow that works is top-down and narrow. Start at the red node in the actions tree, select it, and read the Call tab for the parameters and the error string. Then switch to Log and read the last few lines, which carry the timeout message and the actionability state at the moment of the timeout. Then look at the after snapshot and inspect the element the locator resolved to โ often the locator matched a different element than the author assumed, and the snapshot shows exactly which one.
If the action itself looks fine and the assertion is what failed, the Network tab is the next stop. The request that should have populated the list is either missing, still pending, or returning a non-200. Filter the network tab by URL fragment, click the request, and read the response body. This is the step that replaces an hour of adding console.log around a fetch.
If the DOM looks right and the network looks right, the Console tab is the last stop. A React hydration warning, a TypeError from a third-party script, or a CSP violation that blocked a resource will all be here, timestamped against the timeline, so the console error lines up with the action that followed it.
Two habits make future traces easier to read. The first is test.step(), which groups actions into named nodes in the tree so a fifteen-action flow reads as five named phases. The second is testInfo.attach(), which puts a JSON payload, a downloaded file, or a database snapshot into the Attachments tab, so the state that is not in the DOM travels with the trace.
test('submits the order', async ({ page }, testInfo) => {
await test.step('open the cart', async () => {
await page.goto('/cart');
});
await test.step('pay', async () => {
await page.getByRole('button', { name: 'Pay' }).click();
// attach the API payload so it lands in the trace's Attachments tab
const body = await page.evaluate(() => window.__lastOrder);
await testInfo.attach('order.json', {
body: JSON.stringify(body, null, 2),
contentType: 'application/json',
});
});
});
The two steps become two collapsible nodes in the actions tree, and the attachment appears in the tab panel beside the snapshot it was taken next to. A trace recorded this way answers questions the author never thought to ask.
Complete Example Session
// ============================================
// PART 1: THE CONFIG MODE
// ============================================
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
retries: process.env.CI ? 2 : 0, // on-first-retry needs a retry to exist
use: {
trace: 'on-first-retry', // record on attempt 1, keep attempt 1's archive
},
});
// ============================================
// PART 2: THE GRANULAR OBJECT FORM
// ============================================
// playwright.config.ts (excerpt)
use: {
trace: {
mode: 'retain-on-failure', // record always, delete when the test passes
snapshots: true, // DOM snapshots โ keep these
screenshots: false, // drop the filmstrip to shrink the archive
sources: true, // embed the test source for the Source tab
},
},
// ============================================
// PART 3: THE PER-FILE OVERRIDE
// ============================================
// tests/checkout.spec.ts
import { test, expect } from '@playwright/test';
test.use({ trace: 'on' }); // this file records every attempt, passing or not
test('completes checkout', async ({ page }) => {
await page.goto('/cart');
await page.getByRole('button', { name: 'Pay' }).click();
await expect(page.getByText('Order confirmed')).toBeVisible();
});
// ============================================
// PART 4: THE PROGRAMMATIC RECORDING
// ============================================
// scripts/smoke.ts โ no Playwright Test, just the library
import { chromium } from 'playwright';
const browser = await chromium.launch();
const context = await browser.newContext();
// start before the first navigation so the initial load is in the trace
await context.tracing.start({
title: `smoke ${process.env.GIT_SHA ?? 'local'}`, // shown in Metadata
snapshots: true, // serialized DOM per action
screenshots: true, // filmstrip images
sources: true, // source lines
});
const page = await context.newPage();
await page.goto('https://example.com/login');
await page.getByRole('button', { name: 'Sign in' }).click();
// stop writes the archive; nothing is recorded after this line
await context.tracing.stop({ path: 'trace.zip' });
await browser.close();
// ============================================
// PART 5: THE CHUNKED RECORDING
// ============================================
await context.tracing.start({ snapshots: true }); // one start for the session
await page.getByRole('link', { name: 'Reports' }).click();
await context.tracing.stopChunk({ path: 'trace-reports.zip' }); // window 1
await page.getByRole('button', { name: 'Export' }).click();
await context.tracing.stopChunk({ path: 'trace-export.zip' }); // window 2
// ============================================
// PART 6: THE STEPS AND ATTACHMENTS
// ============================================
test('adds an item to the cart', async ({ page }, testInfo) => {
await test.step('open the product', async () => {
await page.goto('/product/42');
});
await test.step('add to cart', async () => {
await page.getByRole('button', { name: 'Add to cart' }).click();
// this JSON appears in the trace's Attachments tab
await testInfo.attach('cart.json', {
body: JSON.stringify(await page.evaluate(() => window.__cart)),
contentType: 'application/json',
});
});
await expect(page.getByTestId('cart-count')).toHaveText('1');
});
// ============================================
// PART 7: OPENING FROM THE CLI
// ============================================
// $ npx playwright show-trace test-results/checkout-completes-chromium/trace.zip
//
// $ npx playwright show-trace --host 0.0.0.0 --port 9323 trace.zip
// โ exposes the viewer on the local network
// ============================================
// PART 8: EXTRACTING FROM THE ZIP
// ============================================
// $ unzip -o trace.zip -d trace-out
//
// $ jq -c 'select(.type == "before") | {method, params}' \
// trace-out/trace.trace | head -20
// โ the first twenty actions as method/parameter pairs
// ============================================
// PART 9: INSPECTING THE NETWORK STREAM
// ============================================
// $ jq -c 'select(.type == "resource-snapshot")
// | {url: .snapshot.request.url,
// status: .snapshot.response.status}' \
// trace-out/trace.network
// โ one line per request with its status code
// ============================================
// PART 10: THE MERGED REPORT
// ============================================
// $ npx playwright merge-reports --reporter html ./all-blob-reports
//
// Each shard's traces are copied into the merged report's
// data/ folder; the report's Trace links open them directly.
The ten parts covered the config mode, the granular object form, the per-file override, the programmatic start/stop, the chunked recording, the steps and attachments that make a trace navigable, the CLI, the unzip + jq route into the archive, the network stream, and the merged report that carries traces from every shard.
Quick Reference
Trace modes
| Mode | Records | Keeps |
|---|---|---|
'off' | nothing | โ |
'on' | every attempt | every archive |
'retain-on-failure' | every attempt | failing archives |
'on-first-retry' | retries only | every retry |
'on-all-retries' | every retry | every retry |
Options at record time
| Option | Default | Effect |
|---|---|---|
snapshots | true | Serialized DOM before/after each action |
screenshots | true | Filmstrip images |
sources | true | Test source for the Source tab |
name | โ | Label shown in Metadata |
title | โ | Longer label in Metadata |
Opening a trace
| Route | Command |
|---|---|
| CLI | npx playwright show-trace trace.zip |
| CLI, network | npx playwright show-trace --host 0.0.0.0 trace.zip |
| Browser | drag the zip onto trace.playwright.dev |
| Report | click the Trace link on the failing row |
| VS Code | Test Explorer โ Show trace |
Zip contents
| Entry | Content |
|---|---|
trace.trace | Actions, logs, console, snapshot references |
trace.network | Requests, responses, bodies |
trace.stacks | Call stacks per action |
resources/ | SHA-1 named html, css, js, png |
Best Practices
// Record only the attempt that needs evidence
trace: 'on-first-retry' // โ
// Drop screenshots for suites with large traces
trace: { mode: 'retain-on-failure', screenshots: false } // โ
// Group a long flow into named phases
await test.step('open the cart', async () => { ... }); // โ
// Attach the non-DOM state to the trace
await testInfo.attach('order.json', { body, contentType }); // โ
// Use startChunk for long-lived sessions
await context.tracing.stopChunk({ path: 'window.zip' }); // โ
// Upload the zip as a CI artifact on failure
// (the archive is self-contained and opens offline) // โ
// Read the Log tab first when a click times out
// (it holds the actionability sequence) // โ
// Record every passing test in CI
trace: 'on' // โ
// Ship a trace without snapshots
trace: { snapshots: false } // โ
// Log your way to an answer that the trace already has
console.log(await page.content()); // โ
// Record a two-hour session as one archive
await context.tracing.start(); /* ... 2 hours ... */ // โ
// Keep traces for every green build
// (discard on success; artifacts expire anyway) // โ
// Open a trace from a different commit and trust the Source tab
// (confirm the artifact matches the commit) // โ
Common Pitfalls
| Pitfall | Why It Happens | Fix |
|---|---|---|
| No trace on a passing retry | Mode is on-first-retry | Use 'on' for that file |
| Huge archives | Screenshots + long suite | screenshots: false, retain-on-failure |
| Empty Source tab | sources: false at record time | Re-record with sources: true |
| Snapshot shows a blank page | Snapshot taken before render | Select the after state |
| Trace does not open | Truncated zip from a killed job | Upload in afterEach, not on crash |
| Cannot find the request | Filtered by the wrong stream | Search trace.network by URL fragment |
| Attachments missing | attach after the test ended | Call it inside the test body |
| Steps flattened | No test.step() in the test | Wrap each phase in a step |
Real-World Examples
1. Record only on failure
use: { trace: 'retain-on-failure' }
2. Record the first retry
use: { trace: 'on-first-retry' }
3. One file records everything
test.use({ trace: 'on' });
4. Library-only recording
await context.tracing.start({ snapshots: true });
await context.tracing.stop({ path: 'trace.zip' });
5. Chunked windows
await context.tracing.stopChunk({ path: 'step-1.zip' });
6. Named trace
await context.tracing.start({ title: `build ${sha}` });
7. Grouped phases
await test.step('pay', async () => { await payButton.click(); });
8. Attached state
await testInfo.attach('cart.json', { body, contentType: 'application/json' });
9. Open from the CLI
npx playwright show-trace trace.zip
10. Read the action stream
jq -c 'select(.type=="before") | .method' trace-out/trace.trace
Visual
The archive
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ trace.zip โ
โ โ
โ trace.trace actions, logs, console, snapshot refs โ
โ trace.network requests, responses, bodies โ
โ trace.stacks call stacks per action โ
โ resources/ SHA-1 named html, css, js, png โ
โ โ
โ open: npx playwright show-trace trace.zip โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The viewer
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TIMELINE + FILMSTRIP โ
โ โโโ goto โโโคโโโ click โโโคโโโโโ expect โโโโโค โ
โ network โโฌโฌโ โโฌโฌโฌโฌโฌโ โ
โ console โฒ error โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ACTIONS โ SNAPSHOT โ
โ โธ goto /cart โ before | after โ
โ โพ step "pay" โ <div class="cart"> โ
โ โธ click Pay โ <button disabled> โ
โ โ expect visible โ Pay โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Call โ Log โ Errors โ Console โ Network โ Source โ โฆ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The recording lifecycle
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ tracing.start({ snapshots, screenshots, sources }) โ
โ โ โ
โ โโโ action โโโบ before snapshot + log + network โ
โ โโโ action โโโบ before snapshot + log + network โ
โ โ โ
โ tracing.stop({ path }) โ
โ โ โ
โ โผ โ
โ trace.zip โโโบ show-trace โโโบ HTML report โโโบ VS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Choosing a mode
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LOCALLY IN CI โ
โ retries: 0 retries: 2 โ
โ trace: 'retain-on- trace: 'on-first-retry' โ
โ failure' โ
โ โ
โ keep failures keep the failed attempt โ
โ no retry cost retry that passes is silent โ
โ โ
โ large suite? โ screenshots: false, retain-on-failure โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Summary
| Item | Value |
|---|---|
| Format | .zip archive |
| Action stream | trace.trace (JSON-lines) |
| Network stream | trace.network (JSON-lines) |
| Stacks | trace.stacks |
| Snapshots | resources/ (SHA-1 named) |
| CI mode | on-first-retry |
| Local mode | retain-on-failure |
| Programmatic | context.tracing.start/stop |
| Windowed | startChunk / stopChunk |
| Viewer CLI | npx playwright show-trace |
| Hosted viewer | trace.playwright.dev |
Key takeaways:
- A trace is a zip of JSON-lines streams plus content-addressed snapshots.
trace.tracecarries the actions, logs, and console;trace.networkcarries the requests and responses;trace.stackscarries the call stacks;resources/carries the serialized DOM and the assets it referenced. Nothing in the viewer is magic โ it is a reader for those four entries. - The snapshot is DOM, not a picture. That is the difference between a trace and a video recording. You can expand the tree, select a node, and read its computed styles, which is how you diagnose an element that existed but could not be clicked.
- The Log tab is the actionability record. When a click times out, the log shows each wait โ visible, stable, receives events โ and the element that was actually receiving the pointer at that point. Read it before reading anything else.
on-first-retryis the CI default for a reason. It pays the recording cost only on the attempt that needs evidence, and it preserves the archive of a failed attempt even when the retry passes.test.step()andtestInfo.attach()are what make a trace readable. Steps turn a flat list of forty actions into five named phases, and attachments carry the state that lives outside the DOM into the archive beside the snapshot it belongs to.- Screenshots are the expensive part. With
screenshots: falsea trace keeps the timeline, the DOM snapshots, the log, and the network, at a fraction of the size. Reach for that switch before reaching for a shorter recording window. - The archive is inspectable without the viewer.
unzipplusjqanswers questions in a CI shell where no browser is available, and it is the fastest way to confirm an artifact is not truncated before you spend ten minutes wondering why it will not open.
Remember: The trace is the artifact that replaces reproduction. Record it on the attempt that needs evidence, keep the snapshots and drop the screenshots when size matters, and group the flow into steps so the actions tree reads like the test. When you open it, go in order: the failing node, the Call parameters, the Log actionability lines, the after snapshot, then the Network and Console tabs for the cause behind the symptom. Everything the browser did is in the zip, and the viewer is only the tool that lets you scrub through it.
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!