Debugging Custom Scenarios 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.

Introduction to building Custom Scenario Scans in UserWay's Accessibility Scanner:

Custom Scenario scans allow a developer to scan page components that require user interactions by users creating custom scenario scripts. A Scenario script in a nutshell is a simulation of user actions: mouse clicks and keyboard typing. Scenario scan performs the scan implicitly after all user actions have been completed.

Meaning:
if a particular user journey involves a login, navigation to a product page, and then navigating to the shopping cart, then the scan will only be performed on the final page (cart). If you need to scan multiple pages on a particular journey, you will need to create separate scenarios for them. 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 by 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 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 selector to #submit_btn and Save your scenario by clicking on the Save & Close button: 
    Image with the scenario fixed
  4.  You can also edit your scenario scripts by clicking Edit scenario script in the sitemap list.: 

    Edit the scenario