Back to Prompt Library

Playwright Login Flow Prompt for ChatGPT

Generate a robust Playwright test for a standard login flow, covering success and typical edge cases.

The Prompt

Write a Playwright test script in TypeScript for a login page. Include positive tests (valid credentials) and negative tests (invalid email, invalid password, empty fields, SQL injection attempt). Use Page Object Model.

How to use this prompt

Copy this prompt and paste it into ChatGPT, Claude, or Gemini. Make sure to attach your login page's HTML or DOM snapshot for the best locator generation.

Tired of copying and pasting prompts?

GenTestCase uses a Multi-Agent AI Pipeline (8 specialized agents) to automatically extract requirements, write test cases, and handle edge cases—no prompt engineering required.

Generate Test Cases Automatically

Explore More Software Testing Topics