Change8

v1.51.0

📦 playwrightView on GitHub →
8 features🔧 12 symbols

Summary

Playwright adds IndexedDB storage state, a copy‑prompt button, visible element filtering, git info capture, enhanced test step API, contrast emulation, strict API request status handling, and predicate support for URL assertions.

✨ New Features

  • Added `indexedDB` option to `browserContext.storageState()` to save and restore IndexedDB contents.
  • Introduced “Copy prompt” button on errors in HTML report, trace viewer, and UI mode to copy a pre‑filled LLM prompt.
  • Added `visible` filter option to `locator.filter()` for matching only visible elements.
  • Added `captureGitInfo` option to `testConfig` to include git commit and diff information in test metadata and HTML report.
  • Introduced `TestStepInfo` object for test steps, enabling step attachments and conditional skipping.
  • Added `contrast` option to `page.emulateMedia()` and `browser.newContext()` to emulate the `prefers-contrast` media feature.
  • Added `failOnStatusCode` option to `APIRequestContext` to throw on non‑2xx/3xx responses.
  • Extended `expect(page).toHaveURL()` assertion to accept a predicate.

🔧 Affected Symbols

browserContext.storageStateBrowserContext.storageStatelocator.filtertestConfig.captureGitInfoTestStepInfopage.emulateMediabrowser.newContextAPIRequestContext.failOnStatusCodeexpect(page).toHaveURLtest.stepstep.attachstep.skip