mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
Add Playwright MCP prompts and chat modes for testing and automation (#99)
* Add Playwright MCP prompts and chat modes for testing and automation * Update prompts/playwright-generate-test.prompt.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Enhance Playwright prompts and chatmode descriptions for clarity and consistency * Add model specification to Playwright tester chatmode * Update model specification in Playwright test generation prompt * Add description to Playwright test generation prompt * Refactor Playwright tools list in prompts and chat modes to remove redundant entries as just adding playwright seems to be supported now * Fix typo in Playwright tester responsibilities section --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Aaron Powell <me@aaron-powell.com>
This commit is contained in:
30
prompts/playwright-automation-fill-in-form.prompt.md
Normal file
30
prompts/playwright-automation-fill-in-form.prompt.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
description: 'Automate filling in a form using Playwright MCP'
|
||||
mode: agent
|
||||
tools: ['playwright']
|
||||
model: 'Claude Sonnet 4'
|
||||
---
|
||||
|
||||
# Automating Filling in a Form with Playwright MCP
|
||||
|
||||
Your goal is to automate the process of filling in a form using Playwright MCP.
|
||||
|
||||
## Specific Instructions
|
||||
|
||||
Navigate to https://forms.microsoft.com/url-of-my-form
|
||||
|
||||
### Fill in the form with the following details:
|
||||
|
||||
1. Show: playwright live
|
||||
|
||||
2. Date: 15 July
|
||||
|
||||
3. Time: 1:00 AM
|
||||
|
||||
4. Topic: Playwright Live - Latest updates on Playwright MCP + Live Demo
|
||||
|
||||
5. Upload image: /Users/myuserName/Downloads/my-image.png
|
||||
|
||||
DO NOT SUBMIT THE FORM.
|
||||
|
||||
Ask for a review of the form before submitting it.
|
||||
19
prompts/playwright-explore-website.prompt.md
Normal file
19
prompts/playwright-explore-website.prompt.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
mode: agent
|
||||
description: 'Website exploration for testing using Playwright MCP'
|
||||
tools: ['changes', 'codebase', 'editFiles', 'fetch', 'findTestFiles', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'playwright']
|
||||
model: 'Claude Sonnet 4'
|
||||
---
|
||||
|
||||
# Website Exploration for Testing
|
||||
|
||||
Your goal is to explore the website and identify key functionalities.
|
||||
|
||||
## Specific Instructions
|
||||
|
||||
1. Navigate to the provided URL using the Playwright MCP Server. If no URL is provided, ask the user to provide one.
|
||||
2. Identify and interact with 3-5 core features or user flows.
|
||||
3. Document the user interactions, relevant UI elements (and their locators), and the expected outcomes.
|
||||
4. Close the browser context upon completion.
|
||||
5. Provide a concise summary of your findings.
|
||||
6. Propose and generate test cases based on the exploration.
|
||||
19
prompts/playwright-generate-test.prompt.md
Normal file
19
prompts/playwright-generate-test.prompt.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
mode: agent
|
||||
description: 'Generate a Playwright test based on a scenario using Playwright MCP'
|
||||
tools: ['changes', 'codebase', 'editFiles', 'fetch', 'findTestFiles', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'playwright']
|
||||
model: 'Claude Sonnet 4'
|
||||
---
|
||||
|
||||
# Test 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/test` based on message history
|
||||
- Save generated test file in the tests directory
|
||||
- Execute the test file and iterate until the test passes
|
||||
Reference in New Issue
Block a user