BrauzerLab
← Back to missions 49 / 50

Login with Validation

Medium ~300 sec

The login form comes with client-side validation: submitting with empty fields shows an error message, while submitting with valid data shows a success message. Your task is to cover both paths: first submit the empty form so the error appears, then fill in the fields and submit again.

This scenario is a multi-step flow — each step must be performed in order.

page is already available — write your code below.

TASK

Submit the empty form, then fill in the fields and submit again.

Provided for you
import { test, expect } from '@playwright/test';

test('Login with Validation', async ({ page }) => {
  await page.goto('https://lab.local/mission/login-with-validation');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/login-with-validation
Loading...
Results will appear here — press Run or Check.