Is there support for Trace Viewer with Playwright on LambdaTest?

We are using Playwright TypeScript on LambdaTest for running web automation tests. Is there support for Trace Viewer with Playwright on LambdaTest?

Hey Heena,

The Playwright traces functionality works as is on LambdaTest (Playwright), which means there is no change required in the LambdaTest capabilities used in the tests.

Here is the only change in playwright.config.ts

const config: PlaywrightTestConfig = {
  testDir: "tests",
  timeout: 300000,
  /* use: {}, */
  use: {
    trace: 'on', // Options: 'on', 'off', 'retain-on-failure', 'on-first-retry'
  },

Post setting trace to ‘on’ (can be set to any other supported option), you would see that trace is generated successfully in the test-results folder (created in the root folder).

Trace.zip is created for every test case executed as a part of your suite, details below :

You can see that tracing start & stop pointers also on the LambdaTest dashboard (use the browser screenshots).

Finally, you can open the trace file (as mentioned in the official documentation of Playwright) using the command npx playwright <trace-folder>/<trace-file-name>.zip (use the Playwright screenshot).