BrauzerLab
← Back to missions 17 / 50

Dropdown — `selectOption`

Medium ~150 sec

Native <select> elements cannot be controlled with click(). Playwright’s selectOption() method is designed for exactly this.

In the delivery form, select Azerbaijan (az) from the country dropdown and submit the form.

selectOption() accepts a value (value), visible label (label), or { index }. The page object is already available.

In this simulation selectOption uses the option element’s value attribute. The value for Azerbaijan is 'az'.

TASK

Select «Azerbaijan» from the country dropdown, then submit the form.

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

test('Dropdown — `selectOption`', async ({ page }) => {
  await page.goto('https://lab.local/mission/select-option');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/select-option
Loading...
Results will appear here — press Run or Check.