Jutsu Library
Curated external techniques - each tagged with the rank it supports and the date it was last verified. The fixtures-vs-POM story moves fast; dates keep it honest.
Getting Started
Install Playwright, create your first test, run it. The official starting point.
Test Generator (Codegen)
Record actions in a browser and generate test code automatically. Your first test in 60 seconds.
Locators
The definitive guide to finding elements. Role, label, text, testid - and when to use each.
Playwright mistakes to avoid
Hardcoded waits, fragile selectors, redundant try/catch.
Page object models
The canonical baseline for structuring page objects in Playwright.
POM with Playwright
Locators-in-page-objects rule and a clean folder structure.
Test Fixtures
Custom test context with test.extend(). Share setup, teardown, and helpers across tests.
Authentication
Login once, reuse everywhere. storageState saves auth so tests skip the login page.
Best practices 2026 - start with fixtures
The modern argument for fixtures over classic POM classes.
Fixtures vs POM
Pairing POM with fixtures to cut boilerplate without losing structure.
Parameterize Tests
Run the same test with different data. One test body, many scenarios - no copy-paste.
Network Interception
Intercept, modify, and mock HTTP requests. Control what the server returns.
Mock APIs
Replace real API calls with controlled responses. Test edge cases the real server can't reproduce.
Frames & iframes
frameLocator() for testing content inside iframes. The only way to reach embedded documents.
Shadow DOM
Playwright auto-pierces open shadow DOM. No manual shadowRoot traversal needed.
Drag and Drop
locator.dragTo() for reordering, file uploads, and interactive UI testing.
CI/CD Introduction
Run Playwright in GitHub Actions, GitLab CI, or any CI provider. The pipeline setup guide.
Test Sharding
Split your suite across parallel workers with --shard. Cut CI time by 4x.
Test Reporters
HTML, JSON, JUnit reporters. Publish results as CI artifacts for debugging.