Injecting Axe a11y tester
I would like to use Crawlee to crawl a bunch of internal sites and run the Axe accessibility scanner on each page. I figured out how to inject the script they reference in their getting started docs (https://github.com/dequelabs/axe-core#getting-started) using the
But every page after that throws this error.
INFO PlaywrightCrawler: Starting the crawl
INFO PlaywrightCrawler: Title of https://dequeuniversity.com/demo/mars/ is 'Mars Commuter: Travel to Mars for Work or Pleasure!'
WARN PlaywrightCrawler: Reclaiming failed request back to the list or queue. Required "window" or "document" globals not defined and cannot be deduced from the context. Either set the globals before running or pass in a valid Element. {"id":"9syPc5JbUuAjPx1","url":"https://dequeuniversity.com/demo/mars/","retryCount":1}
If I comment out the call to axe.run() the error goes away and things 'work'.
Any idea what could be causing this?
page.addInitScript. But every page after that throws this error.
INFO PlaywrightCrawler: Starting the crawl
INFO PlaywrightCrawler: Title of https://dequeuniversity.com/demo/mars/ is 'Mars Commuter: Travel to Mars for Work or Pleasure!'
WARN PlaywrightCrawler: Reclaiming failed request back to the list or queue. Required "window" or "document" globals not defined and cannot be deduced from the context. Either set the globals before running or pass in a valid Element. {"id":"9syPc5JbUuAjPx1","url":"https://dequeuniversity.com/demo/mars/","retryCount":1}
If I comment out the call to axe.run() the error goes away and things 'work'.
Any idea what could be causing this?
MarsCommuter - Your gateway to the Red Planet
GitHub
Accessibility engine for automated Web UI testing. Contribute to dequelabs/axe-core development by creating an account on GitHub.