I want to test pages as an authenticated user with pa11y-ci.
I am running pa11y-ci like this:
pa11y-ci --sitemap http://www.example.com/sitemap.xml --sitemap-find https --sitemap-replace http
I found some documentation on logging in with pa11y before running a test.
In my case, I'm using Drupal, so the login step looks like this:
"actions": [
'navigate to http://example.lndo.site/user/login'
'set field #edit-name to pa11y',
'set field #password to password',
'click element #edit-submit',
'wait for path to be /user'
]
However, I don't know how to add this "actions"
to my .pa11yci
configuration file, or how to call pa11y-ci
and use this login step.
How can I log in before running a pa11y-ci
test?
I was able to log in like this in my
.pa11yci
:First I do the anonymous pages (making sure to log out first), then I log in, and then I do my authenticated pages.
The only problem with this approach is that I can't use the
--sitemap
command to test pages while authenticated.