Created
September 15, 2026 14:37
-
-
Save up1/ed2fa7b4d58f666c8e5e8a759ef644f8 to your computer and use it in GitHub Desktop.
Playwright skill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: playwright-ui-test | |
| description: Browser automation testing skill using Playwright for UI testing | |
| --- | |
| ## Workflow of playwright-ui-test skills | |
| 1. Read requirements and identify the UI flows to be tested from <user requirement> and HTML file from user. | |
| 2. Generate test cases for each identified flow using the Playwright framework. | |
| 3. Run the generated test cases and validate the results | |
| 4. If the test cases fail, analyze the failure and fix the issues in the application or test cases and run until all test cases pass successfully. | |
| ## Project structure | |
| ``` | |
| tests/ | |
| ├── features/ | |
| │ └── feature.flow.success.spec.ts | |
| │ └── feature.flow.failure.spec.ts | |
| ├── pages/ | |
| │ └── login.page.ts | |
| │ └── dashboard.page.ts | |
| └── utils/ | |
| └── helper.ts | |
| ``` | |
| ## Playwright UI Test best practices | |
| 1. Use descriptive test names and organize tests into logical groups. | |
| 2. Use page objects to encapsulate UI interactions and improve test maintainability. | |
| 3. Use assertions to validate expected behavior and outcomes. | |
| 4. Keep tests independent and avoid relying on the state of other tests. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment