gravity-ui / uikit

https://gravity-ui.com
MIT License
520 stars 84 forks source link

Unable to click Switch in Playwright #1556

Closed ogonkov closed 2 weeks ago

ogonkov commented 2 months ago

I've tried to click on Switch in Playwright via selector

getByRole('switcher', {name: 'Some switcher name'})

But Playwright is unable to do it, because of a error

<span class="g-switch__slider"></span> intercepts pointer events

Looks like this element is laying over original input, and this cause error.

amje commented 3 weeks ago

@ogonkov Yes, indeed we have complex layout for this control. For such case you can force playwright to click