This repository contains some example tests that demo Playwright's capabilities/features.
These demo tests include:
- Sample examples generated by Playwright
- Device simulation (Enable one of the mobile viewports from
playwright.config.ts
file) - Context isolation
- Reusable State
- API Testing
- Intercept network requests
- Geo-location simulation
- Accessibility testing
- Visual regression testing (A local static web site will automatically be served at http://localhost:3000, see
playwright.config.ts
file) - Fixture use example
- Page Performance testing using Google Lighthouse
- Download the zip file or clone this repository.
- Change the directory to
PlaywrightFeaturesDemo
.
cd PlaywrightFeaturesDemo
- Install dependencies.
npm install
- Install browsers.
npx playwright install
- Run tests.
npx playwright test