abhinaba-ghosh / axe-playwright

:wheelchair:: Custom commands for Playwright to run accessibility (a11y) checks with axe-core
https://www.npmjs.com/package/axe-playwright
MIT License
190 stars 20 forks source link

getViolations method is not working with xpath selectors #203

Open nikhilwaichal opened 1 year ago

nikhilwaichal commented 1 year ago

With current implementation getViolations method is noly working with the css selectors and not xpath for xpath it is throwing error "frame.evaluate: DOMException: Failed to execute 'querySelectorAll' on 'Document': '//button[text()='Submit']' is not a valid selector" Please refer below screenshot for same: image

could you please help us to resolve issue

unlikelyzero commented 11 months ago

@nikhilwaichal you should not be using xpath selectors with playwright. Especially for something as simple as a submit button