Debugging custom scenario scans in UserWay's Accessibility Scanner

Rodrigo Asai
Rodrigo Asai
  • Updated

UserWay's Accessibility Scanner allows users to create custom scanning scenarios. Custom Scenario Scan is a tool that allows developers to simulate user journeys through a website to ensure there are no accessibility issues. Multiple scenarios can be mapped at once, and a detailed report is generated for any issues detected.

Building Custom Scenario Scans

Using custom scenario scans, a developer creates custom scenario scripts that will be used to scan page components requiring user interactions. A scenario script is a simulation of user actions: mouse clicks and keyboard typing. The scenario then runs a scan implicitly once all user actions have been completed.

Example of a user journey:

  1. User login
  2. User navigates to a product page
  3. User navigates to the shopping cart

The scan will only be performed on the final page (the shopping cart).

If you need to scan multiple pages on a particular journey, you will need to create separate scenarios.

A scenario consists of 3 parts: name, initial page URL, and scenario script.

Authoring scenario scripts is similar to programming in a functional programming language. Scenario scripts are written using standard JavaScript language, plus a few high-level functions provided by our scenario SDK.

Please find our debugging guide below:

  1.  In this scenario, we have intentionally changed the selector in line 4 (to 'oops..'), to ensure the journey test will fail: 

    Intention error added to the scenario

  2. See the sample test results after the journey/scenario test. After 10 - 15 seconds, you should see a popup with an error message(s) and screenshot:

    Error message and logs from test Journey

  3. Once you close the popup, you can fix the problem: set the selector to #submit_btn
  4. Save your scenario by clicking on the Save & Close button: 
    Image with the scenario fixed

  5.  You can also edit your scenario scripts in the sitemap list. Click the Edit scenario script text link:

    Edit the scenario