dimanche 6 décembre 2020

How do I log in / authenticate before testing in pa11y-ci?

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://anata.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?

Aucun commentaire:

Enregistrer un commentaire