Learn Playwright, step by step
38 chapters, from your first line of JavaScript to a framework a team can share and reviewing tests an AI wrote. Chapters 1 to 5 are free to read, no sign-up.
Act I — Just Enough JavaScript
- WelcomeWhat PlayForge is, how to use it, setting up your laptop, and asking the AI tutor.
- Chapter 1Values and VariablesStore text, numbers and true/false, and print them: your first lines of code.
- Chapter 2Decisions and LoopsMake code choose with if and repeat with loops, the way a test checks and retries.
- Chapter 3FunctionsPackage steps into reusable blocks, the building block of every test helper.
- Chapter 4Arrays and ObjectsWork with lists and records, the shape of every piece of test data.
- Chapter 5Your First Playwright TestInstall Playwright, run and record a test, read it line by line, and clone your framework.
- Chapter 6Async and AwaitWhy every browser step needs await, and what happens when you forget it.
- Chapter 7Classes and ModulesOrganise code into classes and files, ready for page objects.
Act II — Playwright Core
- Chapter 8How Playwright WorksBrowser, context and page; actions; navigation; and why Playwright waits for you.
- Chapter 9Locators I: What the User SeesFind elements by role, label and text, the way a user does, and survive strict mode.
- Chapter 10Locators II: Scoping and RotNarrow, filter and chain locators, and spot the ones that will break next sprint.
- Chapter 11AssertionsChecks that retry until the page is ready, visual comparisons, and failures that explain themselves.
- Chapter 12Debugging a Red TestUI mode, the inspector and the trace viewer: go from "it failed" to "here is why".
- Chapter 13Waiting and SynchronisationRace conditions, spinners, network waits and controlling the clock, without one sleep.
- Chapter 14Forms and InputsTyping, dropdowns, autocomplete and date pickers that fight back.
- Chapter 15Dialogs, Drag and TablesModals, alerts, drag-and-drop, sliders, and tables with pagination.
- Chapter 16The Test RunnerStructure, hooks, config, tags and parallel runs: control what runs and when.
Act III — Build the Framework
- Chapter 17Git for TestersCommit, branch, ignore secrets, push, and read a pull request.
- Chapter 18Environments and ConfigOne framework, many environments: dev, QA and staging from one switch, with secrets kept safe.
- Chapter 19FixturesSetup and teardown every test gets for free: logged-in users, pages, data.
- Chapter 20Page ObjectsModel the app as classes a team of forty can share, and the anti-patterns to avoid.
- Chapter 21Test DataJSON, CSV and Excel test data, and many users and roles in one spec.
- Chapter 22The Shared Library and LoggingHelpers every test reuses, step logs in the report, and sharing one library across repos.
- Chapter 23API TestingCall APIs directly, check responses, and combine API setup with UI tests.
- Chapter 24Mocking the NetworkFake responses, simulate errors, and record and replay traffic.
- Chapter 25Frames, Tabs, Files and Login StateIframes, shadow DOM, popups, uploads and downloads, and logging in once.
- Chapter 26ReportingHTML, Allure and JUnit reports that a manager and a CI dashboard can both read.
- Chapter 27CI/CDA complete GitHub Actions pipeline, then the same pipeline on Jenkins, Azure DevOps and GitLab.
- Chapter 28Running at ScaleDocker, sharding, cloud browsers and mobile emulation.
Act IV — Judgement
Act V — The AI Era
- Chapter 31Reviewing AI-Written TestsSix ways an AI-written test passes review and catches nothing, and how to judge one.
- Chapter 32Agent ToolingPlaywright's test agents and MCP server: what they do, and where they produce confident nonsense.
- Chapter 33Leading a Team That Uses AIWhat to hand to an AI, reviewing at volume, and a codebase both people and agents can work in.