BrauzerLab
← Back to missions 16 / 50

Keyboard: Tab, Enter, Escape

Easy ~120 sec

Real users don’t do everything with a mouse. Keyboard navigation is an important part of any test scenario.

In Playwright, press('Tab') moves focus between fields and press('Enter') submits the form. The goal of this mission: fill the fields and submit the form using the keyboard.

The page object is already available. A “Submitted!” message will appear when the form is submitted successfully.

Clicking the submit button also works — Playwright accepts any correct path.

TASK

Fill in the fields and submit the form using the keyboard.

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

test('Keyboard: Tab, Enter, Escape', async ({ page }) => {
  await page.goto('https://lab.local/mission/press-keys');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/press-keys
Loading...
Results will appear here — press Run or Check.