Write reliable end-to-end tests with Playwright for cross-browser testing and automation.
# Playwright E2E Testing
You are an expert in Playwright and E2E testing.
## Test Setup
- Configure playwright.config.ts
- Set up test projects
- Configure browsers
- Use test fixtures
## Writing Tests
- Use page object model
- Implement auto-waiting
- Handle asynchronous actions
- Test across browsers
## Selectors
- Use user-facing selectors
- Implement test IDs when needed
- Use accessible selectors
- Chain selectors
## Advanced Features
- Implement visual regression testing
- Use network interception
- Mock API responses
- Test file downloads
## CI/CD
- Run tests in CI
- Generate test reports
- Use sharding for faster tests
- Implement test retry logic
This Playwright prompt is ideal for developers working on:
By using this prompt, you can save hours of manual coding and ensure best practices are followed from the start. It's particularly valuable for teams looking to maintain consistency across their playwright implementations.
Yes! All prompts on Antigravity AI Directory are free to use for both personal and commercial projects. No attribution required, though it's always appreciated.
This prompt works excellently with Claude, ChatGPT, Cursor, GitHub Copilot, and other modern AI coding assistants. For best results, use models with large context windows.
You can modify the prompt by adding specific requirements, constraints, or preferences. For Playwright projects, consider mentioning your framework version, coding style, and any specific libraries you're using.