playwright-generate-test
作者: github
使用互動式瀏覽器探索與驗證,從情境中生成 Playwright 測試。引導您逐步完成測試建立:情境審查、瀏覽器探索、元素檢查、互動驗證,以及最終測試生成。整合 Playwright MCP 工具,在撰寫測試程式碼前檢查頁面元素、擷取選擇器並驗證互動。使用 @playwright/test 框架生成 TypeScript 測試,並自動儲存至 tests 目錄...
npx skills add https://github.com/github/awesome-copilot --skill playwright-generate-testTest Generation with Playwright MCP
Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps.
Specific Instructions
- You are given a scenario, and you need to generate a playwright test for it. If the user does not provide a scenario, you will ask them to provide one.
- DO NOT generate test code prematurely or based solely on the scenario without completing all prescribed steps.
- DO run steps one by one using the tools provided by the Playwright MCP.
- Only after all steps are completed, emit a Playwright TypeScript test that uses
@playwright/testbased on message history - Save generated test file in the tests directory
- Execute the test file and iterate until the test passes