Back to Library
UI

Login Error Handling

Prompt

Generate a Playwright test that performs login with invalid credentials and validates error message visibility with retry-safe assertions.

Example Code

await page.fill('#username','wrong'); await page.fill('#password','wrong'); await page.click('#login'); await expect(page.locator('.error')).toBeVisible();

Quick Actions

PRO TIP

Paste this prompt as a comment in your .spec.ts file and let Copilot generate the test.

Next Steps
Browse Prompts