Playwright Recipes
View CommandsBrowser testing framework for reliable end-to-end tests. Automate Chromium, Firefox, and WebKit with powerful selectors.
8 recipes
API Testing with Playwright
Use Playwright's built-in request context to test REST APIs directly, validate responses, and combine API calls with browser tests.
Run Playwright Tests in GitHub Actions
Configure Playwright to run E2E tests in GitHub Actions CI with browser caching, parallel execution, artifact uploads, and failure reporting.
Generate Tests by Recording Browser Actions
Use Playwright Codegen to record user interactions in the browser and automatically generate test scripts with proper locators.
Test React/Vue Components in Isolation
Use Playwright Component Testing to mount and test individual React, Vue, or Svelte components in a real browser without running the full application.
Parallel Test Execution with Sharding
Scale Playwright test suites by splitting tests across multiple CI machines using sharding for dramatically faster feedback loops.
Initialize Playwright with TypeScript
Set up Playwright Test from scratch with TypeScript, configure browsers, create your first test, and run it across multiple browsers.
Debug with Trace Viewer
Record and analyze test execution traces to debug failures with DOM snapshots, network logs, console output, and step-by-step action replay.
Screenshot Comparison Testing
Implement visual regression testing with Playwright to detect unintended UI changes by comparing screenshots against golden baselines.