BrauzerLab
← Back to missions 15 / 50

`type()` — Append Without Clearing

Easy ~120 sec

fill() and type() behave differently: fill() clears the field’s existing content and writes the new value, while type() appends to whatever is already there.

The field on the right already contains prefix-. Your job is to append suffix without removing it, so the final value is prefix-suffix.

fill() will not work here — it would erase the existing value.

The goal is only the final result: the exact value prefix-suffix.

TASK

Append text to the field without clearing its existing value.

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

test('`type()` — Append Without Clearing', async ({ page }) => {
  await page.goto('https://lab.local/mission/type-vs-fill');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/type-vs-fill
Loading...
Results will appear here — press Run or Check.