Loading video player...
Welcome to Part 23 of our comprehensive Playwright TypeScript course! In this tutorial, we compare Playwright MCP and the Playwright Agent CLI to help you understand how AI coding agents can automate browser interactions via MCP tool calls or concise shell commands. [ RESOURCES ] Learn how to create a Test Automation Framework: https://youtu.be/okZTCnQcugM Learn How to Perform API Testing using Playwright: https://youtu.be/oFlQjS0VzXI Learn how to perform Visual Testing using Playwright: https://youtu.be/69CeEA-gU-M Learn Test Annotations in Playwright: https://youtu.be/Ci1Rgcp0u7Y Learn how to perform Parallel and cross-browser testing using Playwright: https://youtu.be/C20SnsIhvtY Official Playwright MCP Documentation: https://playwright.dev/docs/getting-started-mcp Official Playwright Agent CLI Documentation: https://playwright.dev/agent-cli/introduction Official Playwright Documentation: https://playwright.dev/ Github Link for web application: https://github.com/Animesh66/demo-front-end Github link for Automation Code: https://github.com/Animesh66/pw-demo Learn about MCP: https://modelcontextprotocol.io/docs/getting-started/intro [ CONNECT WITH ME ] Website: https://www.learnwithanimesh.com LinkedIn: https://www.linkedin.com/in/qa-amukherjee/ Need a one-on-one session? Book here: https://topmate.io/animesh_mukherjee/ [ TIMESTAMPS ] 0:00 - Introduction 0:12 - Table of Contents 0:21 - What is LLM? 1:03 - What is MCP 2:28 - Playwright MCP 9:46 - Playwright CLI 10:44 - Playwright MCP vs Playwright CLI 17:07 - Knowledge Check 17:21 - Conclusion What You'll Learn in This Video đ What is Playwright MCP? Playwright MCP provides browser automation through the Model Context Protocol. It lets LLMs and AI coding tools interact with web pages using structured accessibility snapshots instead of relying only on screenshots or vision models. đ How Playwright MCP Works The MCP server returns accessibility snapshots with roles, text, and element references such as ref=e5. The AI can use these refs to type, click, check boxes, navigate pages, inspect UI state, and interact with applications more reliably. đ ď¸ How to Install and Use Playwright MCP You will learn the standard MCP configuration using npx @playwright/mcp@latest, plus setup options for VS Code, Cursor, Claude Code, Claude Desktop, Windsurf, and other MCP-compatible clients. âď¸ Playwright MCP Features We cover navigation, clicking, typing, screenshots, keyboard and mouse actions, dialogs, tabs, direct Playwright code execution, network monitoring, route mocking, console messages, cookies, localStorage, and storage state. đ§Š Playwright MCP Configuration You will learn about headless and headed mode, browser selection with --browser, persistent and isolated user profiles, config files, storage state, and standalone HTTP server mode using --port 8931. â¨ď¸ What is Playwright CLI? The Playwright Agent CLI gives coding agents token-efficient browser automation commands such as playwright-cli open, snapshot, click, type, screenshot, tracing, sessions, and storage commands. đ How to Install and Use Playwright CLI You will learn commands such as npm install -g @playwright/cli, playwright-cli install --skills, playwright-cli open, playwright-cli snapshot, playwright-cli click, and playwright-cli screenshot. âď¸ Advantages of Playwright CLI over Playwright MCP Agent CLI can be better for codebase-heavy workflows because it produces compact output, supports skills, keeps browser sessions alive through a daemon, uses accessibility refs, and works naturally in shell-command-based coding-agent loops. Hashtags: #learnwithanimesh #playwrighttutorial #testautomation #playwright #typescript #playwrightmcp #mcp #playwrightcli