Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Playwright AI Testing: Claude Code, MCP, CLI & Test Agents
Role Play
Highest Rated
Rating: 4.9 out of 5(20 ratings)
59 students

Playwright AI Testing: Claude Code, MCP, CLI & Test Agents

Automate, generate, and self-heal Playwright tests in TypeScript with Claude Code, Playwright CLI, MCP, and Test Agents
Last updated 10/2026
English

What you'll learn

  • Write and debug reliable Playwright tests in TypeScript using fixtures, locators, and web-first assertions
  • Perform API testing and mock API responses with Playwright to validate real app behavior
  • Set up Claude Code with project instructions, reusable commands, and permissions for testing workflows
  • Use Playwright CLI and the Playwright skill to explore pages and support test automation.
  • Configure Playwright MCP so Claude Code can navigate, inspect, and generate tests from a live page
  • Create a Claude Code test-improver subagent that reviews locators, assertions, and test reliability
  • Use Playwright's Planner, Generator, and Healer agents to plan coverage, create tests, and investigate failures
  • Diagnose failing tests with Playwright Trace Viewer and distinguish test issues from application bugs
  • Build a Playwright TypeScript capstone automating six scenarios: date picker, table, drag-and-drop, calendar, iframe, and multi-tab navigation

Course content

8 sections • 53 lectures • 3h 33m total length
  • Introduction to Playwright Automation and AI Agents2:47

    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.

  • Install the Playwright Prerequisites2:55

    You'll install Node.js, set up Visual Studio Code, and add the Playwright extension, everything you need before installing Playwright itself.

  • Install Playwright and Browser Engines4:05

    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 Your First Playwright Test2:29

    Run the sample example.spec.ts file that Playwright generates during setup, then open the report to see how test results are displayed.

  • Clone and Run the Practice Application2:37

    You'll clone the practice application built for this course, install its dependencies, and start it locally.

Requirements

  • A computer that can run Node.js and Visual Studio Code, both free; setup is covered step by step early in the course.
  • No prior Playwright or test automation experience required. You'll write your first test early in the course, step by step.
  • Basic familiarity with any programming language helps, but isn't required. TypeScript basics are taught from scratch.
  • Claude Code needs a paid Anthropic plan (Pro, Max, Team, Enterprise) or API billing. There's no free tier, so budget for this before enrolling.

Description

“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.

Who this course is for:

  • QA engineers and SDETs who want to add Claude Code and AI agents to their Playwright testing workflow
  • Developers from any background, such as Python, Java, or .NET, who want to learn Playwright and Claude Code
  • Manual testers moving into automation who want an AI-assisted starting point
  • Complete beginners with no coding or testing background looking for a hands-on entry point