BrauzerLab
← Back to missions 4 / 50

Find by Placeholder

Easy ~90 sec

Sometimes a form field has no <label> element — but it does have placeholder text. In that case Playwright’s getByPlaceholder method is the right tool.

The page has two inputs: one for search and one for newsletter signup. Find the field with the «Search…» placeholder and fill it with the word Playwright.

page is already available.

TASK

Type text into the «Search...» field.

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

test('Find by Placeholder', async ({ page }) => {
  await page.goto('https://lab.local/mission/get-by-placeholder');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/get-by-placeholder
Loading...
Results will appear here — press Run or Check.