playwright-generate-test

Generates Playwright TypeScript tests from user scenarios using Playwright MCP tools.

1|1|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/ultraviollettnympho/transit-ticket --skill playwright-generate-test-ultraviollettnympho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-generate-test
Source: https://github.com/ultraviollettnympho/transit-ticket/tree/main/.github/skills/playwright-generate-test
Command: npx skills add https://github.com/ultraviollettnympho/transit-ticket --skill playwright-generate-test-ultraviollettnympho

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test.

What problem does it solve? Writing Playwright end-to-end tests from scratch requires manually exploring page structure, selectors, and interactions, which is slow and error-prone. This Skill automates that process by driving a real browser through Playwright MCP to observe the scenario before emitting working test code. ## Core Features & Use Cases - Scenario-Driven Test Generation: Takes a natural-language test scenario and produces a complete Playwright TypeScript test using @playwright/test. - Step-by-Step Browser Exploration: Runs each step through Playwright MCP tools first, ensuring selectors and flows are verified against the live page rather than guessed. - Iterative Execution and Fixing: Saves the generated test to the tests directory, executes it, and iterates until the test passes. - Use Case: A QA engineer describes "user logs in, adds an item to the cart, and checks out" and receives a verified, passing Playwright test file without writing selectors by hand. ## Quick Start Ask the assistant to generate a Playwright test for your scenario, for example: generate a Playwright test that logs in and verifies the dashboard loads.

Frequently Asked Questions about playwright-generate-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Playwright test from a scenario?

Provide a natural-language scenario describing the user flow, and the Skill drives a real browser through Playwright MCP step by step. After all steps complete, it emits a Playwright TypeScript test using @playwright/test and saves it to the tests directory.

What is Playwright MCP and how does it help test generation?

Playwright MCP is a tool server that lets an AI control a real browser to navigate pages, click elements, and inspect the DOM. Using it before writing code ensures selectors and flows are verified against the live application instead of guessed.

Does the generated Playwright test get executed automatically?

Yes. After the test file is saved in the tests directory, the Skill executes it and iterates on the code until the test passes, so the output is a verified working test rather than a draft.

What happens if I do not provide a test scenario?

The Skill will ask you to provide one. It does not generate test code prematurely or based on assumptions, since a concrete scenario is required to drive the browser exploration steps.

Which test framework does the generated code use?

The generated tests are written in TypeScript using the @playwright/test runner, Playwright's official test framework. The output is a standard test file that can run in any existing Playwright project.