Playwright Web Automation
Playwright Web Automation
Automate real browsers with Playwright's modern, reliable API: locators, auto-waiting, fixtures, network mocking, authentication state, parallel execution, and CI-ready diagnostics.
Helpful before you begin (optional -- you can start this course now): Software Testing Foundations
Who it's for
Developers or testers comfortable with JavaScript/TypeScript fundamentals and the vocabulary of Software Testing Foundations who want to automate real, cross-browser end-to-end tests. Familiarity with REST APIs (as covered in API Testing and Automation) helps with the network-related lessons but isn't required.
What you'll be able to do
- Explain Playwright's Browser/Context/Page model and set up a real, local multi-browser project
- Write reliable tests using role-based locators, web-first assertions, and Playwright's auto-waiting, without fixed sleeps
- Handle navigation, forms, frames, popups, dialogs, and file uploads/downloads
- Observe and mock network requests, and use APIRequestContext and stored authentication state
- Compose fixtures, design page objects and test data, and configure parallel execution with sensible retries and timeouts
- Diagnose a failing test using the trace viewer, screenshots, and CI-produced reports
Not started — 14 lessons, no account required.
Start this coursePractice this course →Add to a study plan →Interview questions →
Architecture and locators
The Browser/Context/Page model, real local setup, and finding elements reliably.
- 19 min
Playwright Architecture, Setup, and the Test Lifecycle
Browser, context, and page — the three-layer model Playwright is built on — and how a Playwright project discovers and runs a test from start to finish.
- 19 min
Locators: Finding Elements the Way a User Would
Why accessible, role-based locators are Playwright's recommended default, and how to rank a set of candidate locators by real-world stability.
Waiting, assertions, and navigation
Auto-waiting and web-first assertions, then navigation and form interaction.
- 19 min
Auto-Waiting and Web-First Assertions
The specific set of checks Playwright runs before every action, and why an expect() assertion in Playwright is fundamentally different from a plain equality check.
- 19 min
Navigation and Form Interaction
What page.goto actually waits for, and the fill/select/check vocabulary Playwright provides for real, form-specific interaction.
Multi-page flows and network control
Frames, popups, and dialogs, then observing/mocking network calls and APIRequestContext.
- 20 min
Frames, Popups, Dialogs, and File Transfer
Handling content that isn't on the main page at all — an iframe's own document, a new tab, a native browser dialog, and a real file being uploaded or downloaded.
- 20 min
Network Observation and Mocking
Watching real network traffic a page generates, and deliberately replacing part of it — the difference between observing and mocking, and when each is the right tool.
- 19 min
APIRequestContext: API Calls Without a Browser
Making real HTTP requests directly from a Playwright test — no browser, no page, no rendering — and why that's often the faster, more reliable way to set up test state.
Authentication, fixtures, and structure
Reusable authentication state, custom fixtures and hooks, page objects and test data.
- 21 min
Authentication State and Browser Projects
Signing in once and reusing that session across every test — and running the exact same suite against multiple real browser engines through Playwright projects.
- 21 min
Fixtures, Hooks, and Parameterization
Playwright's fixture system as dependency injection for tests, how it composes cleanly where hooks don't, and running the same test logic across many data variations.
- 20 min
Page Objects, Alternatives, and Test-Data Design
Encapsulating a page's locators and actions behind a class, the honest limits of that pattern, and designing test data that's independent between tests.
Execution and diagnostics
Parallelism, retries, and timeouts, then the trace viewer and CI reporting.
- 20 min
Parallelism, Retries, and Timeouts
How Playwright runs many tests at once safely, when a retry genuinely helps versus when it just hides a real bug, and the layered timeout settings that actually control a test's patience.
- 20 min
Trace Viewer, Screenshots, Video, and Debugging
The diagnostic artifacts Playwright can capture around a failure, and Playwright Inspector's step-through debugging — reconstructing exactly what happened without re-running blind.
- 21 min
Reporting, CI Execution, and Environment Configuration
Turning a test run's results into something a team can actually act on, and the specific settings that make a suite behave correctly and safely in CI rather than just on a laptop.
Reliability and architecture
Diagnosing flaky tests, accessibility-aware testing, and secure, maintainable suite design.
Where to go next
Optional -- these build well on what you just learned, but any course can come next.