How does Playwright tracing file compare to HAR file?

1.7k Views Asked by At

Playwright lets you record HAR, but there's also context.tracing.start. The latter also lets you capture screenshots to the resulting ZIP, but HAR file seems to be better supported outside of Playwright. So what is the difference, are trace files basically HAR files with screenshots, or is there any info missing that would be found in a HAR?

1

There are 1 best solutions below

2
On

Playwright Tracing enables you to see screenshots, DOM Snapshots, console logs, Playwright method calls etc. These can be viewed using the Playwright trace viewer.

HAR is a file specification which supports only network requests, these can be viewed e.g. in Chrome DevTools.

See here for more information about the trace viewer: https://playwright.dev/docs/next/trace-viewer