selectOption() works on native elements

The simplest case: a standard HTML

` `typescript

// Select by visible text

await page.getByLabel('Country').selectOption('Germany');

// Select by value attribute

await page.getByLabel('Country').selectOption({ value: 'de' });

// Select by index (0-based, avoid this — fragile)

await page.getByLabel('Country').selectOption({ index: 2 });

// Verify selection

await expect(page.getByLabel('Country')).toHaveValue('de');

// Select multiple (for elements. For custom dropdowns, you need a different approach.

Custom dropdown components

Most modern web apps use custom dropdown components (React Select, Headless UI, Material UI) instead of native or a

/