DEV Community

Cover image for Playwright MCP + Claude Code: Let AI Test Your Website Before Writing Tests
DevLycan
DevLycan

Posted on Originally published at devlycan.com

Playwright MCP + Claude Code: Let AI Test Your Website Before Writing Tests

What if AI could interact with your website first — and only then write the automated tests?

In this experiment, I connected Playwright MCP with Claude Code and tested the workflow on a real e-commerce application.

I focused on three practical areas:

• Purchase and add-to-cart flow
• Form validation with invalid inputs
• Responsive behavior across Mobile, Tablet, and Desktop

The interesting part was that Claude Code did more than interact with the UI. During testing, it also surfaced issues related to validation, application behavior, and API responses that were not always obvious from the screen alone.

After the manual exploration, I asked Claude Code to turn the tested workflows into reusable Playwright tests.

The key takeaway for me was the workflow itself:

Test the real application → understand its behavior → convert verified flows into automated tests.

This does not remove the need for Developers or QA Engineers to review the results, but it can reduce repetitive testing work and provide a useful starting point for building repeatable test coverage.

In the full article, I cover the setup, prompts, real test cases, findings, generated Playwright tests, and important limitations step by step.

Read the full article:

Devlycan - Technology & Programming Insights

Devlycan - Technology, programming, AI, lifestyle, and future trends—simple insights for the new digital generation.

favicon devlycan.com

Top comments (0)