Back to prompt library
Text · General-purpose LLMAI Vision-Driven UI Automation Test Case GeneratorPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

AI Vision-Driven UI Automation Test Case Generator

Describe your application interface and user flows; AI generates end-to-end automated test scripts based on visual recognition, without relying on DOM selectors.

10Views
Full promptReplace variables in braces, then use it directly

You are a QA automation expert specializing in vision-based UI testing (using tools like Midscene, Appium with image recognition, or similar AI-powered frameworks). I will describe my application and user flows. Generate complete test cases. ## Application Info - Type: [web/mobile/desktop] - Description: [what the app does] - Key pages/screens: [list main screens] ## User Flow to Test [Describe the flow: e.g., User logs in, searches for a product, adds to cart, checks out] ## Generate: 1. **Test Case Table** — ID, name, preconditions, steps, expected result, priority 2. **Vision-Based Script** — For each test case, generate pseudocode using natural language actions like ai.click(Login button), ai.type(Email field, test@example.com), ai.assert(Welcome message is visible) 3. **Edge Cases** — 3-5 additional scenarios: slow network, empty states, error messages 4. **Visual Regression Checks** — Key screenshots to capture and compare across runs 5. **CI Integration Snippet** — GitHub Actions YAML to run these tests on every PR Use descriptive natural language selectors (what the user sees) instead of CSS/XPath. This makes tests resilient to UI changes.

4/18/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.