Analyze a Workflow

Link to Analyze a Workflow copied to clipboard

The "spec" command runs a workflow script, interacting with the page and testing for accessibility as it goes.

To use the spec command, you will need a spec file. These look something like this:

{
  "projects": [
    {
      "name": "deque.com",
      "id": "deque",
      "globalActions": [
        "dismiss modal \"#CybotCookiebotDialog\" with close button \"#CybotCookiebotDialogBodyButtonAccept\""
      ],
      "pageList": [{
        "name": "Homepage",
        "url": "https://www.deque.com/"
      }, {
        "name": "Search",
        "url": "https://www.deque.com/",
        "actions": [
          "type \"axe\" into element \"#searchform input\"",
          "click element \"#searchform button[type=submit]\"",
          "wait for element \".m-search-page\" to be found",
          "analyze"
        ]
      }]
    }
  ]
}

To run this spec file with axe DevTools CLI, use the following command:

axe spec ./axe-workflow.json ./axe-reports

For more details, see spec files