This repository provides working code examples for features introduced in each Playwright version, making it easier to:
- ✨ Understand what's new in each release
- 🔍 Learn how to use new features with practical examples
- 🧪 Compare implementation approaches across versions
- 🚀 Test and experiment with new APIs
Each version has its own dedicated examples directory:
v1.49.0-examples/
- getByAltText locator, TestInfo properties, UI mode improvementsv1.50.0-examples/
- Test step timeout, conditional step skipping, accessibility improvementsv1.51.0-examples/
- IndexedDB storage, visibility filtering, contrast emulationv1.52.0-examples/
- Class assertions, enhanced aria snapshots, request options
Each directory contains:
new-features.spec.ts
- Practical test examples demonstrating the featuresREADME.md
- Detailed explanation of the features with reference linksplaywright.config.ts
- Configuration using version-specific options
Version | Feature |
---|---|
v1.52.0 | toContainClass() assertion |
v1.52.0 | Enhanced Aria snapshots with /children and /url |
v1.52.0 | maxRedirects option in apiRequest |
v1.52.0 | ref option in locator.ariaSnapshot() |
v1.52.0 | Test annotations with testResult.annotations |
v1.51.0 | IndexedDB storage |
v1.51.0 | Visibility filtering |
v1.51.0 | Contrast emulation |
v1.50.0 | Test step timeout |
v1.50.0 | Conditional step skipping |
v1.50.0 | Accessibility improvements |
v1.49.0 | Aria snapshots with YAML |
v1.49.0 | test.fail.only() method |
v1.49.0 | Multiple global setup/teardown |
v1.49.0 | Canvas preview in snapshots |
v1.49.0 | tracing.group() for trace organization |
- Node.js 16+
- npm or yarn
-
Clone this repository:
git clone https://github.com/qa-gary-parker/playwright-release-notes-examples.git cd playwright-release-notes-examples
-
Install dependencies:
npm install
-
Install browsers:
npx playwright install
Use our convenient npm scripts to run examples for specific versions:
# Run v1.52.0 examples
npm run test:v1.52
# Run v1.51.0 examples
npm run test:v1.51
# Run v1.50.0 examples
npm run test:v1.50
# Run v1.49.0 examples
npm run test:v1.49
# Run all examples
npm run test:all
Contributions are welcome! Please see our Contributing Guidelines for details on how to:
- Report bugs or request features
- Submit pull requests
- Add examples for new Playwright versions
If you find this project helpful, consider:
- ⭐ Starring the repository on GitHub
- 🐦 Sharing on social media
- 💻 Contributing examples or improvements