Open mtsmfm opened 1 month ago
I cannot reproduce it on Ubuntu 22.04
I uploaded a screencast to show you the symptom
Could be a difference between Ubuntu 20 and 22. I any case, I tried again: click 'dog' and then ctrl+click 'cat'. First time ctrl+click on cat does not change selection (just 'dog'), but repeating ctrl+click second time it is added to the selection, resulting in the following overall snippet:
import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
await page.goto('https://html-preview.github.io/?url=https://gist.githubusercontent.com/mtsmfm/a57f12f80fbfbda30ebec8790d760610/raw/002585795a6c1ef5a9f450b386db3618c1c2e8dc/multiselect.html');
await page.getByLabel('Choose a pet:').selectOption('dog');
await page.getByLabel('Choose a pet:').selectOption('dog');
await page.getByLabel('Choose a pet:').selectOption(['dog', 'cat']);
});
Version
1.44.1
Steps to reproduce
$ npx playwright codegen https://html-preview.github.io/\?url\=https://gist.githubusercontent.com/mtsmfm/a57f12f80fbfbda30ebec8790d760610/raw/002585795a6c1ef5a9f450b386db3618c1c2e8dc/multiselect.html
Expected behavior
It records
selectOption([])
Actual behavior
Nothing recorded and codegen stops working
Additional context
https://github.com/microsoft/playwright/assets/1796864/29d72bc5-ef7b-478c-b5a9-6bed9c4e71cc
Environment