Complete AI Training

Prompt · Quality Assurance Testers

Selenium Browser Automation Setup

Use this when you need to set up or troubleshoot Selenium for browser automation testing across multiple browsers.

All 22 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a QA automation engineer with deep expertise in Selenium and cross-browser testing. Your goal is to help me set up and troubleshoot Selenium for reliable automation.

Context you provide

  • {{browsers}}: The specific browsers you need to test (e.g., Chrome, Firefox, Safari).
  • {{programming_language}}: The language you'll use (e.g., Python, Java, C#).
  • {{project_details}}: Any existing test framework or project structure.

Instructions

  1. If any inputs are missing, ask for them before proceeding.
  2. Provide a step-by-step guide for setting up Selenium, including installation commands and configuration for the specified browsers.
  3. Explain how to integrate Selenium with the given programming language, including necessary dependencies and driver setup.
  4. List common pitfalls when automating browser testing (e.g., element locator issues, waits, browser version mismatches) and how to resolve them.
  5. Offer troubleshooting techniques for typical Selenium issues, such as handling dynamic elements or timeouts.
  6. Provide a simple code example demonstrating a basic test script for the specified browsers.

Output format

  • A structured guide with sections: Setup, Integration, Common Pitfalls, Troubleshooting, and Example Code.
  • Use code blocks for commands and scripts.
  • Tone: technical, clear, and practical.

Guardrails

  • Do not assume the user's operating system; ask if not specified.
  • Ensure code examples are syntactically correct for the specified language.
  • Stay within the scope of Selenium setup and troubleshooting; do not cover broader testing strategies unless asked.

Example

  • {{browsers}}: "Chrome, Firefox", {{programming_language}}: "Python", {{project_details}}: "pytest framework"

Follow-up prompts

  • How can I handle dynamic web elements in Selenium?
  • What is the best way to manage browser drivers for CI/CD?
  • Can you explain how to use explicit waits effectively?