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.

intermediate14 lessons6 modules9h total

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 course

Practice this course →Add to a study plan →Interview questions

Architecture and locators

The Browser/Context/Page model, real local setup, and finding elements reliably.

  1. 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
  2. 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.

    19 min

Waiting, assertions, and navigation

Auto-waiting and web-first assertions, then navigation and form interaction.

  1. 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
  2. Navigation and Form Interaction

    What page.goto actually waits for, and the fill/select/check vocabulary Playwright provides for real, form-specific interaction.

    19 min

Multi-page flows and network control

Frames, popups, and dialogs, then observing/mocking network calls and APIRequestContext.

  1. 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
  2. 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.

    20 min
  3. 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.

    19 min

Authentication, fixtures, and structure

Reusable authentication state, custom fixtures and hooks, page objects and test data.

  1. 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
  2. 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.

    21 min
  3. 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.

    20 min

Execution and diagnostics

Parallelism, retries, and timeouts, then the trace viewer and CI reporting.

  1. 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
  2. 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.

    20 min
  3. 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.

    21 min

Reliability and architecture

Diagnosing flaky tests, accessibility-aware testing, and secure, maintainable suite design.

  1. Flaky-Test Diagnosis, Accessibility-Aware Testing, and Maintainable Architecture

    Bringing this course's tools together: a real diagnostic process for flakiness, accessibility as a natural side effect of Playwright's own locator philosophy, and the structural choices that keep a growing suite maintainable.

    23 min

Where to go next

Optional -- these build well on what you just learned, but any course can come next.