Playwright test steps support subtitles and params in reports
Introduced 2026-09-04 · score 0.97
HOW TO USE IT
When adding structured context to a test step, pass `subtitle` and `params` in the `test.step()` options; reporters expose them as `testStep.subtitle` and `testStep.params`, and the trace viewer and HTML report display step context.
import { test } from '@playwright/test';
await test.step('Login', async () => {
// ...
}, { subtitle: 'as admin', params: { user: 'admin' } });WHY THIS HELPS
Add structured context to a test step and inspect it in the trace viewer or HTML report.
REQUIREMENTS AND LIMITATIONS
- Version: v1.63.0
- title (required): Step name.
- body (required): Step callback.
- options: Optional object of step options.
- options.subtitle: String that complements the step title; reported as `testStep.subtitle`.
- options.params: Serializable object describing the step; reported as `testStep.params`.
- testStep.subtitle: Available subtitle; for Playwright API calls, the target locator or navigation URL; for `test.step()`, the author-provided subtitle.
- testStep.params: Available step parameters; API call steps may include a locator and call arguments, while `test.step()` steps contain author-provided parameters.
- Prerequisite: Use Playwright v1.63.0 or later; the docs mark `subtitle`, `params`, `testStep.subtitle`, and `testStep.params` as added in v1.63.
FIRST-PARTY EVIDENCE
- https://github.com/microsoft/playwright/releases/tag/v1.63.0
- https://playwright.dev/docs/api/class-test#test-step
- https://playwright.dev/docs/api/class-teststep#test-step-subtitle
- https://playwright.dev/docs/api/class-teststep#test-step-params
Check the installed version and the source before using it. Entry JSON