webdriverio / visual-testing

Image comparison / visual regression testing for WebdriverIO
https://webdriver.io/docs/visual-testing
MIT License
111 stars 40 forks source link

support for shadowRoot elements in @wdio/visual-service for tab testing #515

Open pclicious opened 3 weeks ago

pclicious commented 3 weeks ago

ShadowRoot elements are not getting recognized during tab testing While trying tab testing on my website, which is having many shadow root elements, it was not capturing tabs for elements inside shadowRoot

await expect(await browser.checkTabbablePage(screenshotName, { // ignoreColors: true, })).toEqual(differencesCount);

User should have parameterized option to enable tab testing for shadowRoot elements as well Referred https://www.npmjs.com/package/tabbable, here we have getShadowRoot option to enable shadowRoot elements, similarly we should have an option in the library to enable tab testing to include shadowRoot elements along with other elements.

wswebcreation commented 1 week ago

Hi @pclicious

Do you also have an example site that I can work with that has shadowroot elements and other elements that are can be tabbed?