pa11y / pa11y-ci

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
https://pa11y.org
GNU Lesser General Public License v3.0
515 stars 63 forks source link

Timeout is ignored - wait for element #191

Closed yansifw closed 1 year ago

yansifw commented 1 year ago

Hello!

I am trying to configure the default timeout when using wait for element. I've added the timeout option in defaults, url and chromeLaunchConfig sections but I still get the default timeout:

Error: waiting for function failed: timeout 30000ms exceeded

Is this timeout configurable? How can I increase it?

Thanks!

josebolos commented 1 year ago

Pa11y has a timeout flag/config option that allows you to specify the time in milliseconds that pa11y will wait for a test to finish before giving up.

This timeout value is for the entire test run, so that will include the time to initialise Chrome through the puppeteer library, load the page, carry any actions that have been specified, and finally run the automated accessibility test. As of pa11y 6.1.0 the default timeout is 60 seconds.

There's an additional timeout for each individual action that the browser takes, this is set by the puppeteer library and it's set to 30 seconds. Although this value can be changed in puppeteer, I don't think that this timeout is exposed in pa11y so it's not something that can be configured directly.

Some alternatives could be: