Skip to content
masterclass Buddy

Playwright · Class

TestInfo

TestInfo gives a Playwright test access to its current test data and controls. Use it to inspect status, manage timeouts, create safe output paths, and attach files or buffers.

Last updated

Since
v1.10

Syntax

test(title, async (fixtures, testInfo) => { /* ... */ });
testInfo.attach(name, options);
testInfo.outputPath(...pathSegments);
testInfo.setTimeout(timeout);

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • test.info
  • test.attachments
  • testInfo.attachments
  • testInfo.outputDir
  • testInfo.outputPath
  • testInfo.status
  • testInfo.expectedStatus
  • testInfo.retry

Source: TestInfo | Playwright. Checked 2026-11-03.