Closed josephceth closed 10 months ago
@josephceth sure, I've tackled it like this in the past:
await page.locator('input[id=<ID OF SELECT>]').fill('<FILTER TEXT>');
await page.click('.svelte-select-list .list-item >> nth=0'); // or something similar to match your need
Or
await page.locator('input[id=<ID OF SELECT>]').click();
await page.click('.svelte-select-list .list-item >> nth=1'); // or something similar to match your need
Welp...I feel dumb, the svelte-select was a piece of a much large component and the id wasn't being applied to the select it was applied to the hidden input containing the value.
As if by magic, once an Id was provided to the actual
Thanks!
Pretty straight forward issue, I am struggling with setting the value of a svelte-select component for our playwright testing, whether through writing my own code or using the recording, the results are inconsistent.
We've tried:
...in an attempt to open the control and select an item, but again, it doesn't work all the time.
Any help would be appreciated...thanks!