This repository collects reusable "chatmodes" (conversation templates/prompts) tailored for automation testing tasks. Each chatmode is a self-contained markdown file that encodes the prompt, instructions, examples, and expected input/output style so you can quickly run or adapt automation-related conversations.
-
SeleniumToPlaywrightConverter/🎭 Selenium ➡ Playwright.chatmode.md— Converts Selenium Page Object Model (POM) code to Playwright in C# .NET. Maintains structure, functionality, and test logic while modernizing to Playwright's async patterns and built-in waiting mechanisms. -
CypressToPlaywrightConverter/🎭 Cypress ➡ Playwright.chatmode.md— Converts Cypress test code to Playwright in JavaScript/TypeScript. Transforms Cypress test implementations into modern, robust Playwright tests while preserving business logic and improving reliability.
PlaywrightBDDScenarios/🎭 Playwright BDD Scenarios (Reqnroll).chatmode.md— Creates BDD test scenarios for Playwright in C# .NET using Reqnroll (formerly SpecFlow). Helps structure feature files with Gherkin syntax, generate step definitions, and integrate with Playwright for robust test automation.
PlaywrightExtentReports/🎭 Playwright Extent Reports.chatmode.md— Implements ExtentReports for Playwright test automation in C# .NET. Sets up comprehensive HTML reporting with screenshots, test execution logs, detailed metrics, and beautiful visualizations for test results.
- Open the chatmode file you want to use from the folders above.
- Provide your test code, requirements, or description to the chat interface that's running the chatmode.
- The chatmode defines the expected input shape and the preferred output style. Copy the returned code into your project and run it after adding appropriate dependencies.
Selenium to Playwright (C#.NET):
Convert the following Selenium test to Playwright (C#.NET + Playwright Test):
// Selenium WebDriver
driver.Navigate().GoToUrl("https://example.com");
driver.FindElement(By.Id("login")).SendKeys("user");
driver.FindElement(By.Id("password")).SendKeys("pass");
driver.FindElement(By.CssSelector("button[type=submit]")).Click();
Cypress to Playwright (JavaScript):
Convert this Cypress test to Playwright:
cy.visit('/login');
cy.get('#username').type('testuser');
cy.get('#password').type('password123');
cy.get('button[type="submit"]').click();
cy.url().should('include', '/dashboard');
BDD Scenarios (Reqnroll):
Create BDD scenarios for a login feature with valid/invalid credentials and
empty field validation using Playwright and Reqnroll.
Extent Reports:
Implement Extent Reports for my Playwright C# .NET test project with
screenshots on failure and detailed test logging.
- Chatmodes are markdown files containing the instructions and examples. Use descriptive filenames and include the source → target when the chatmode performs conversions (for example:
Selenium ➡ Playwright). - Keep the
🎭prefix for human-recognizable chatmode files if helpful; it's optional and purely cosmetic.
- Create a new markdown file at the repository root or inside a dedicated folder, following the naming convention above.
- Include: intent description, example inputs, expected outputs, and any configuration toggles (language, runner, sync/async).
- Add a short README entry in this file referencing the new chatmode (or submit a PR to update this repository README).
Contributions are welcome. Simple steps:
- Fork this repository.
- Add or improve chatmode markdown files.
- Open a pull request describing the change and example usage.
This repository does not ship a license by default — if you'd like to apply one, MIT is a good permissive choice. Add a LICENSE file in the repo root for clarity.
| Chatmode | Purpose | Language/Framework | Use Case |
|---|---|---|---|
| Selenium ➡ Playwright | Test Migration | C# .NET | Converting Selenium POM tests to Playwright |
| Cypress ➡ Playwright | Test Migration | JavaScript/TypeScript | Converting Cypress tests to Playwright |
| BDD Scenarios (Reqnroll) | BDD Framework | C# .NET + Reqnroll | Creating Gherkin scenarios with Playwright |
| Extent Reports | Test Reporting | C# .NET | Adding comprehensive HTML reports to tests |
Copilot-ChatModes-For-Testing/
├── SeleniumToPlaywrightConverter/
│ └── 🎭 Selenium ➡ Playwright.chatmode.md
├── CypressToPlaywrightConverter/
│ └── 🎭 Cypress ➡ Playwright.chatmode.md
├── PlaywrightBDDScenarios/
│ └── 🎭 Playwright BDD Scenarios (Reqnroll).chatmode.md
├── PlaywrightExtentReports/
│ └── 🎭 Playwright Extent Reports.chatmode.md
└── README.md