
You'll get an overview of what this course covers and see that no prior automation experience is required. You'll also see why the course uses TypeScript for its examples while still welcoming developers from Python, Java, and .NET backgrounds, since the focus is on AI agents, Playwright CLI & Playwright MCP rather than any one language.
You'll install Node.js, set up Visual Studio Code, and add the Playwright extension, everything you need before installing Playwright itself.
You'll install Playwright and run the init command, which installs the browser engines (chromium, firefox, webkit) Playwright needs for browser automation and testing.
Run the sample example.spec.ts file that Playwright generates during setup, then open the report to see how test results are displayed.
You'll clone the practice application built for this course, install its dependencies, and start it locally.
Learn the difference between unit, API, and UI tests. See how the test pyramid explains the trade-off between test speed, cost, and coverage, and where Playwright UI tests fit.
You'll learn what the DOM is and how HTML structures a web application, then use the browser's inspect tool to locate elements on a page.
In this lesson, you will learn how CSS styles a page and how JavaScript makes it interactive. You will use browser DevTools to inspect CSS, run JavaScript in the console, and better understand web pages before automating them.
In this lesson, you will learn what JavaScript is, write a simple hello world example, and see how TypeScript adds type safety. You will also understand why Playwright test files commonly use the .spec.ts extension.
In this lesson, you will learn what TypeScript arrow functions are and why they are commonly used in Playwright tests. You will compare regular functions with arrow functions and understand the syntax needed for upcoming test examples.
In this lesson, you will create a simple Playwright test that prints hello world. You will learn the basic test syntax, understand the test function, and see how arrow functions are used inside Playwright test files.
In this lesson, you will write a Playwright test that opens a real web page. You will learn async, await, fixtures, and how the page fixture gives your test access to browser actions like page.goto().
In this lesson, you will explore the playwright.config.ts file and understand the most important configuration options. You will learn about projects, browsers, testDir, retries, fullyParallel, and workers.
In this lesson, you will use Playwright Codegen to locate elements and generate test code by recording user actions. You will see both the VS Code extension workflow and the terminal workflow.
In this lesson, you will learn how to debug Playwright tests using the VS Code extension and terminal commands. You will see how to pause execution, inspect test flow, and understand where a test is failing.
In this lesson, you will use Playwright Trace Viewer to analyze test execution and failures. You will enable traces, configure trace capture on first retry, inspect snapshots and logs, and briefly see how error-context.md can help AI agents analyze failures.
In this lesson, you will learn how to perform API testing in Playwright using the request fixture. You will automate API requests, validate responses, check status codes, and understand how API testing fits into a Playwright test automation workflow.
In this lesson, you will learn how to mock API responses in Playwright and test different application scenarios. You will create hands-on examples for negative cases, alternate responses, and controlled test conditions.
In this lesson, you will learn important Playwright best practices from the official documentation. You will focus on testing user-visible behavior, using accessibility-based locators, and keeping tests as isolated as possible.
In this lesson, you will continue learning Playwright best practices from the official documentation. You will review additional recommendations for writing reliable, maintainable, and scalable Playwright automation tests.
Practice your Playwright skills by automating the HourToLearn demo application. You will learn how to clone the demo app and test project, run the application locally, and prepare for the hands-on assignment.
In this lesson, you will learn what a coding agent is and how it differs from a normal chat agent. You will understand how coding agents can access project files, use tools, read context from your system, and help with real Playwright automation tasks.
In this lesson, you will install Claude Code and prepare your system for AI-assisted coding. You will complete the required setup so Claude Code can work with your local project and support your Playwright automation workflow.
In this lesson, you will compare using Claude Code from the terminal and from the VS Code extension. You will see that both provide similar functionality, but this course will mostly use the terminal workflow for hands-on automation tasks.
In this lesson, you will use Claude Code for the first time with a hands-on prompt. You will ask Claude to write a Playwright test without giving extra tools or detailed project context, then review what it generates and why context matters.
In this lesson, you will initialize Claude Code inside the test project and create a CLAUDE.md file. You will understand what this file does, how it stores project instructions, and why it is useful for consistent agentic coding.
In this lesson, you will learn what sessions and context mean in an agentic coding tool. You will see why good context improves AI responses, and how missing, incorrect, or unnecessary information can lead to poor generated code.
In this lesson, you will learn what slash commands are in Claude Code and how they help you perform common actions faster. You will explore frequently used commands and understand when to use them during coding workflows.
In this lesson, you will learn what custom slash commands are and how they can speed up repeated workflows. You will create a sample custom command and understand how it can be reused in your Playwright automation project.
In this lesson, you will explore Claude Code settings and understand setting scopes. You will create a settings.local file and learn how to allow or deny tool permissions for safer and more controlled agentic coding.
In this lesson, you will learn the different Claude Code modes and when to use each one. You will compare planning, manual approval, edit, and auto-style workflows so you can choose the right level of control for each task.
In this lesson, you will learn what MCP is, why Playwright MCP is useful, and how it helps Claude Code interact with a web app. You will see why MCP is better than only using basic page access, because it can provide tools for navigation, locators, snapshots, screenshots, and browser context.
In this hands-on lesson, you will use Claude Code with Playwright MCP to automate a login page in the demo app. You will configure tool access in settings.local.json, allow Claude to navigate the app, inspect the screen, use MCP tools, and generate a Playwright test.
In this lesson, you will review the previous MCP automation session step by step. You will see how Claude explored the page, used MCP tools, understood the login flow, and created the test case. You will also learn what Claude missed and why human review is still important.
In this lesson, you will learn what Playwright MCP snapshots are and why they are useful for AI agents. You will understand how snapshots represent page structure, how references help agents identify elements, and how Claude uses this information to automate web pages more reliably.
In this lesson, you will explore additional Playwright MCP capabilities such as PDF, vision, testing, and network support. You will learn why these capabilities are useful, how to enable them, and how PDF and vision capabilities help Claude understand more complex automation scenarios.
In this lesson, you will learn why Playwright MCP is useful even when Claude can inspect pages in other ways. You will understand why AI agents are non-deterministic, why real automation should run through Playwright test scripts, and how MCP helps make test generation more controlled and reliable.
In this lesson, you will learn what the testing and assertion capabilities provide in Playwright MCP. You will see how browser_generate_locator tool make locator creation and test generation more deterministic, and why these capabilities are important for writing and maintaining reliable automation tests.
In this hands-on lesson, you will ask Claude Code to automate a page using mocked API responses. Claude will use Playwright MCP capabilities to explore the app, inspect the development code, understand the scenario, mock the response, and generate the required test case.
In this lesson, you will review the previous API mocking demo and understand how the agent approached the task. You will see how Claude explored the app, understood the scenario, created the Playwright test, added validations, and used Playwright MCP to support the automation workflow.
In this lesson, you will learn what subagents are and why they matter in agentic coding. You will see how subagents handle specialized tasks, keep a separate clean context, and use limited tool access. This concept applies across Claude Code, Cursor, Codex, GitHub Copilot, and VS Code style workflows.
In this hands-on lesson, you will create a test-improver subagent in Claude Code. You will define front matter in the subagent .md file, write a clear description, set tool access and model options, and teach the agent to review Playwright tests against best practices.
In this lesson, you will run the Playwright Test Improver subagent against an existing Playwright Test file. You will review the recommendations it provides for improving locators, assertions, test structure, and test reliability.
You will also see how the main Claude Code agent delegates the task to the subagent. This demonstrates the difference between the main agent context and the separate subagent context.
By the end of this lesson, you will understand why subagents are useful for focused Playwright automation tasks and how they help keep larger AI-assisted testing workflows organized.
In this lesson, you will learn what the official Playwright Test Agents are and how they support AI-powered Playwright test automation. You will install the Playwright Test Agent definitions for Claude Code and explore the three built-in agents:
Playwright Test Planner — explores an application and creates a test plan.
Playwright Test Generator — converts a test plan into Playwright Test files.
Playwright Test Healer — investigates failing tests and helps repair test issues.
You will learn how the Playwright agent definitions are added as agent Markdown files in your project. You will also explore the generated seed.spec.ts file and .mcp.json configuration file.
Finally, you will understand the difference between:
Playwright MCP — a general MCP server that lets AI tools control and inspect a browser.
Playwright Test Agents — specialized agents that use the playwright-test MCP server for test planning, test generation, and test healing workflows.
The Playwright Test Agent definitions can be generated for Claude Code, OpenAI Codex, Visual Studio Code, and OpenCode. The same agentic coding ideas can also help when using tools such as Cursor and GitHub Copilot. (playwright.dev)
In this hands-on lesson, you will use the official Playwright Test Planner agent to explore the course demo application and create a detailed test plan.
You will ask the Planner agent to identify important user flows, positive test scenarios, negative test scenarios, validations, and edge cases. You will then review the generated Markdown test plan and understand how it can be used as the input for automated test generation.
You will also learn how seed.spec.ts helps the Planner agent understand your Playwright project setup, including fixtures, hooks, authentication, and application initialization steps.
By the end of this lesson, you will have a clear test plan for the demo application and understand why human review is important before generating Playwright tests. The Planner agent produces a human-readable Markdown plan designed to be used in the next generation step. (playwright.dev)
In this hands-on lesson, you will convert the test plan created by the Playwright Test Planner into automated Playwright Test cases.
You will use Claude Code with the official Playwright Test Generator agent to create test files from the Markdown test plan. You will also demonstrate how two focused agent tasks can work on different test scenarios, helping automate multiple test cases more efficiently.
After the tests are created, you will review the generated Playwright code. You will check the test structure, locators, assertions, test data, validations, and readability of the generated tests.
By the end of this lesson, you will understand how the Planner and Generator agents work together in an agentic Playwright testing workflow: plan first, generate tests second, then review the generated code. Playwright documents the Generator agent as the step that transforms a Markdown test plan into Playwright Test files. (playwright.dev)
In this hands-on lesson, you will use the official Playwright Test Healer agent to investigate failing Playwright tests.
First, you will introduce a problem into a Playwright Test file, such as an incorrect locator, outdated assertion, or invalid test step. You will then run the Healer agent and review how it investigates the failure, identifies the test issue, and suggests or applies an appropriate fix.
Next, you will introduce a real bug into the course demo application. This helps you understand an important testing principle: not every failing test should be fixed by changing the test code.
You will learn how to tell the difference between:
A test automation issue, where the test may need to be updated.
An application bug, where the product behavior is incorrect and the test should continue to fail until the application is fixed.
Finally, you will review the result, run the Playwright test again, and verify whether the correct fix was made. The Healer agent runs failing tests and attempts repairs, but its changes should always be reviewed before accepting them. (playwright.dev)
Learn what a command-line interface (CLI) is and how Playwright CLI helps AI agents work with web pages. Compare the CLI with Playwright MCP, then install Playwright CLI and try opening a browser, inspecting a page, and capturing screenshots and snapshots.
Explore useful Playwright CLI commands and see how they work in practice. You’ll run commands to interact with a page, inspect references, capture page information, and review the Playwright code generated during the workflow.
In this hands-on lesson, you'll use Playwright CLI directly with Claude Code to automate a page in the practice demo application. You'll also see why combining CLI commands with Agentic Skills makes automation more reliable.
Learn what agent skills are and how they give coding agents reusable instructions for specific tasks. Explore the structure of a skill, the idea of progressive disclosure, and how skills help agents find the right guidance when they need it.
You'll learn what the Playwright CLI Skill is and how it combines CLI commands with instructions into one reusable skill. You'll install it and explore the reference files it includes.
Use Claude Code, Playwright CLI, and the Playwright skill to automate a page in the course demo application. Follow the workflow from exploring the page to creating a Playwright test, and see how the skill guides the agent through the task.
“This course contains the use of artificial intelligence.”
Learn Playwright automation with TypeScript, then use Claude Code, Playwright MCP, Playwright CLI, skills, and Playwright Test Agents to create and investigate tests in hands-on projects.
You don’t need previous Playwright or test automation experience. Start by setting up Playwright, exploring web pages, writing tests, and debugging failures. Then practice using AI agents to explore applications, create tests, and investigate issues. You’ll also learn to review AI-generated code and keep human judgment part of the testing process.
Learn Playwright Testing from the Ground Up
Set up Node.js, Visual Studio Code, Playwright, and the required browser engines. Run your first test and learn how to view the results.
Learn key Playwright and TypeScript concepts, including tests, fixtures, page navigation, configuration, locators, and debugging. Use Playwright Codegen to record browser actions and generate test code. Use Trace Viewer to investigate test runs and failures.
You’ll also learn to perform API testing with Playwright’s request fixture, mock API responses, and apply best practices for writing reliable, maintainable tests.
Use Claude Code for Playwright Automation
Get started with Claude Code and learn how coding agents can work with project files and tools. Practice writing prompts, providing project context, and using CLAUDE md to guide an agent’s work.
Explore Claude Code sessions, slash commands, custom commands, settings, permissions, and modes. Then create a custom test-improver subagent to review Playwright tests and suggest improvements.
Explore Playwright MCP, CLI, and Skills
Playwright MCP and Playwright CLI provide different ways for AI agents to work with a browser. Explore both workflows and practice using them to support test automation.
With Playwright MCP, configure Claude Code to navigate and inspect a live web page. Explore snapshots, screenshots, locators, and other browser capabilities. Then use MCP in hands-on UI automation and API-mocking examples. You’ll also learn why AI-generated tests should be reviewed and run as regular Playwright tests.
With Playwright CLI, install the CLI and try commands to open a browser, interact with a page, inspect page information and references, capture screenshots and snapshots, and review generated Playwright code.
Learn what agent skills are and how they provide reusable instructions and reference material. Explore progressive disclosure and the structure of a skill. Install and inspect the Playwright skill, review its reference files, and see how it combines CLI commands with instructions for an AI agent. Then use Claude Code, Playwright CLI, and the skill to automate a page in the course practice application.
Use the Official Playwright Test Agents
Learn about Playwright’s three Test Agents:
Planner explores an application and creates a test plan.
Generator turns a test plan into Playwright test files.
Healer investigates failing tests, helps fix them, and helps identify possible application bugs.
Install and use the agents in hands-on lessons, following the workflow from planning tests to generating them and investigating failures.
Practice with Hands-On Projects
Throughout the course, you’ll work with the course demo application and complete hands-on exercises. You’ll also use an online e-commerce demo application to automate additional real-world workflows.
In the capstone project, practice testing six scenarios:
Date pickers
Data tables
Drag-and-drop
Calendars
Iframes
Multi-tab navigation
You’ll write Playwright tests yourself and practice AI-assisted workflows. This will help you understand what an agent is doing, review the code it produces, and choose an appropriate approach for your own projects.
What You’ll Learn
Set up Playwright with TypeScript, Visual Studio Code, and the required browser engines.
Write, run, debug, and review Playwright end-to-end tests.
Use fixtures, locators, Codegen, configuration, and Trace Viewer.
Perform API testing and mock API responses with Playwright.
Apply Playwright testing best practices.
Use Claude Code for AI-assisted Playwright automation.
Configure Playwright MCP and use its browser tools to inspect and interact with web pages.
Use Playwright CLI commands to explore pages, capture browser information, and support test creation.
Install and use the Playwright skill with CLI commands, reusable instructions, and reference files.
Create a custom Claude Code subagent to review Playwright tests.
Use the official Playwright Test Agents—Planner, Generator, and Healer—in a testing workflow.
Practice automating date pickers, data tables, drag-and-drop, calendars, iframes, and multi-tab navigation.
Review AI-generated tests and investigate failures as part of your automation workflow.
Who This Course Is For
QA engineers and SDETs who want to use Claude Code and AI agents in a Playwright automation workflow.
Developers who want to learn Playwright with TypeScript, including those with Python, Java, or .NET experience.
Manual testers who want to move into test automation.
Anyone interested in hands-on practice with Playwright MCP, CLI, skills, and Test Agents.
Examples use TypeScript, but the course focuses on Playwright and AI-agent workflows not just one programming language.
Requirements
A computer that can run Node.js and Visual Studio Code.
No previous Playwright or test automation experience is required.
Basic familiarity with any programming language is helpful, but not required.
Claude Code is not available on the Claude Free plan. You’ll need an eligible paid Anthropic plan or API billing to complete the Claude Code exercises.
Learn Playwright automation, then practice using Claude Code, Playwright MCP, Playwright CLI, skills, and Playwright Test Agents in your testing workflow.