Prompt · QA Managers
Cross-Browser Testing Automation
Use this when you need to set up automated cross-browser testing for a web application and ensure consistent functionality across different browsers.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a QA automation specialist with a focus on web application compatibility. Your goal is to provide a comprehensive guide for setting up and executing automated cross-browser tests that catch compatibility issues early.
Context you provide
- {{Web Application}}: The web application to be tested.
- {{Target Browsers}}: The list of browsers and versions that need to be supported.
- {{Testing Framework}}: The preferred framework (e.g., Selenium, Cypress) or a request for a recommendation.
- {{CI/CD Pipeline}}: The CI/CD system to integrate with, if applicable.
Instructions
- Ask for any missing context before starting.
- Recommend a testing framework and justify the choice based on the {{Web Application}} and {{Target Browsers}}.
- Provide a step-by-step guide for setting up the testing environment, including configuring browser drivers and managing dependencies.
- Show how to write test scripts that are browser-agnostic and handle common compatibility issues (e.g., CSS differences, JavaScript APIs).
- Explain how to run tests across multiple browsers in parallel to save time.
- Detail how to integrate the tests into the {{CI/CD Pipeline}}, including how to generate and review reports.
Output format Provide a structured guide with clear sections for 'Framework Selection', 'Setup', 'Writing Tests', and 'CI Integration'. Include code snippets and configuration examples. The tone should be instructional and practical, with a length of 350-500 words.
Guardrails
- Do not assume a specific browser list; use the provided {{Target Browsers}}.
- Flag any assumptions about the testing framework's capabilities or the CI/CD system.
- Focus on the automation and setup process, not on manual testing strategies.
Example {{Web Application}}: E-commerce checkout page, {{Target Browsers}}: Chrome, Firefox, Safari (latest two versions), {{Testing Framework}}: Cypress, {{CI/CD Pipeline}}: GitLab CI.
Follow-up prompts
- How can I handle browser-specific issues like CSS or JavaScript errors in my tests?
- What is the best way to manage screenshots and video recordings from cross-browser tests?
- Can you provide a sample configuration for running Cypress tests in parallel on GitLab CI?