Q12 of 21 · AI for testing

How do you use AI to convert manual test cases into automated scripts?

AI for testingMidai-for-testingmanual-testingautomationtest-conversionai-tools

Short answer

Short answer: Feed the manual test case steps to a language model alongside the target framework, existing Page Objects, and locator conventions. The model handles boilerplate conversion; you fix the selectors (it cannot look at the live DOM) and verify the assertions match real expected values.

Detail

Manual test cases often read like: "1. Navigate to /login. 2. Enter 'user@example.com' in the email field. 3. Click Login. 4. Verify the dashboard is shown." This is procedural enough for a model to translate to Playwright code reliably.

What the model cannot do: find the actual ARIA labels or data-testid values used in your application, or know what "dashboard is shown" means in concrete DOM terms. You have to provide that context — your Page Object classes, the selectors in use — or correct those parts yourself after conversion.

For large backlogs: batch-convert by functional area. Paste 5–10 related test cases at once with the same Page Object as context. Prioritise converting the highest-risk manual tests first — AI conversion gives diminishing returns on edge cases that require domain understanding the model doesn't have. See Requirements to test cases.

// WHAT INTERVIEWERS LOOK FOR

AI handles procedural step conversion; human fixes selectors and assertions. Providing Page Objects as context. Prioritising by risk rather than converting the entire backlog in order.