Playwright
Browser testing framework for reliable end-to-end tests. Automate Chromium, Firefox, and WebKit with powerful selectors.
69 commands
Browse by Topic
Getting Started
Quick setup and installation
Test Execution
Run tests
Code Generation
Record tests
Browsers
Browser management
Tracing
View traces
Reports
Test reports
UI Mode
Interactive debugging
Debugging
Debug tests
Screenshots
Visual capture
Visual Testing
Snapshot comparisons
Configuration
Test config
Component
Component testing
Accessibility
A11y testing
CI Integration
CI/CD setup
Initialize Playwright project
Create a new Playwright project with configuration
Install browsers
Download and install Playwright browsers (Chromium, Firefox, WebKit)
Run tests
Execute all Playwright tests
Run all tests
Run all Playwright tests.
Run specific file
Run tests from a specific file.
Run by grep
Run tests matching a pattern.
Run headed
Run tests with browser visible.
Debug mode
Run tests in debug mode.
UI mode
Run tests in interactive UI mode.
Specific browser
Run tests in specific browser.
Parallel workers
Run tests with specific workers.
Record tests
Record user interactions as tests.
Record with viewport
Record with specific viewport size.
Record Python tests
Generate Python test code.
Save auth state
Save authentication state.
Load auth state
Record with existing auth.
Install browsers
Install all browsers.
Install with deps
Install browsers and system deps.
Install specific browser
Install specific browser.
Install deps only
Install system dependencies only.
Run with trace
Record trace for all tests.
Trace on retry
Record trace only on retries.
View trace
Open trace viewer.
Trace retain on failure
Keep traces only for failures.
Show HTML report
Open the HTML test report.
HTML reporter
Generate HTML report.
JSON reporter
Output results as JSON.
JUnit reporter
Generate JUnit XML report.
Multiple reporters
Use multiple reporters.
Open UI mode
Run tests in interactive UI mode.
UI mode with filter
Open UI mode with test filter.
UI mode specific file
Open UI mode for specific test file.
UI mode port
Run UI mode on custom port.
UI mode host
Run UI mode accessible from network.
Debug mode
Run with Playwright Inspector.
Debug environment
Enable debug mode via env var.
Debug console
Debug with console output.
Pause in test
Add breakpoint in test code.
Slow motion
Run tests in slow motion.
Set global timeout
Set timeout for all tests (60s).
View trace file
Open trace viewer for debugging.
Multiple reporters
Output multiple report formats.
Stop on failures
Stop after specified number of failures.
Full page screenshot
Capture full page screenshot.
Element screenshot
Screenshot specific element.
Screenshot on failure
Auto capture on test failure.
Screenshot all tests
Capture screenshot for all tests.
Omit background
Screenshot with transparent bg.
Visual comparison
Compare against baseline image.
Update snapshots
Update baseline screenshots.
Named snapshot
Visual test with custom name.
Element visual test
Visual test for element.
Threshold config
Allow 10% pixel difference.
Initialize config
Create new Playwright project.
Run with config
Use custom config file.
List projects
List all configured projects.
Global setup
Run global setup script.
Output directory
Set test output directory.
UI mode on network
Open UI mode accessible from any network interface.
Run tests by tag
Run tests matching specific tag.
Exclude tests by tag
Skip tests matching tag pattern.
Repeat each test
Run each test multiple times.
Run with visible browser
Run tests in specific browser with UI.
Get accessibility tree
Capture accessibility tree snapshot.
Axe accessibility tests
Run automated accessibility checks.
Auto-retry flaky tests
Retry failed tests automatically.
Run test shard
Run specific shard for parallel CI.
Use CPU percentage
Limit workers to CPU percentage.
Fully parallel mode
Run all tests in parallel.
Discussion
Loading comments...