Record a Script
The axe Expert extension is officially retired. Read more about this on the axe Expert Replacement page. These pages will be taken down in July of 2024. Email helpdesk@deque.com with any questions or concerns.
Record scripts whenever you want to record yourself taking actions on the page under test in a sequential order so that they can be repeated automatically at a later time. Scripts can be particularly useful when applied to axe Monitor scans (for example, login scripts to establish secure sessions for page access, dynamic content scripts to expose hidden form menus and widgets, or for activating hidden steps in multi-step processes).
You can control which types of events are recorded by selecting options on the Script Recording Options panel, which is accessed via the Options link on the Scripts panel.
Before you begin: Ensure you first have the desired start page loaded in the browser.
-
On the Scripts panel, select Start Recording.

-
Reload the web page in the browser after clicking the Record button. Start performing actions on the page under test as desired, in the desired order (for example, by clicking the Desktops page link on the main horizontal menu).

You will notice that as you interact with the site, a table appears in the main content pane of the
Scriptspanel and rows begin to appear with each column populated with values for each event (for example, in theEventcolumn a'loadURL'event with theURLcolumn as 'http://abcdcomputech.dequecloud.com/desktops.php'). -
When you have finished performing all desired actions, select
Stop Recording(which has replaced theStart Recordingbutton).
You must stop the recording at some point in order to have a recorded script. This enables the previously greyed-out Upload link above the event table. Additionally, this causes Stop Recording to change back to Start Recording again, and displays a Play button beneath.

Recording stops immediately, and every action you recorded now displays as an event row in the Scripts panel table in the right content pane, with each column populated with values.
Not every event will record content values in every column cell, so some (for example, the Details column for the focus event type) may be blank. Additionally, stopping a recording enables the Edit and Delete options in the Actions column menus.

Record and export CLI actions
Record and export CLI scripts using the Scripts panel.
Current supported CLI actions available for script recording and export include:
- change — change the value of
<input>,<select>,<textarea> - click — click an element in the DOM
- navigate — navigate to a new page
In time, we plan to add more CLI actions. The current functionality does allow users to get started with CLI without writing a single line of code!
-
Navigate to the web page you wish to analyze through scripting. For the purposes of this example, we've opened https://dequelabs.github.io/aget-demo-site/.

The Satisfaction Survey dialog that displays in the middle of the browser page. We'll record a small script to dismiss the dialog.
-
Open your browser's developer tools (Chrome for macOS is used in the examples here) and navigate to the axe Expert Extension DevTools tab. Select
Scripts.
-
Activate
Start Recording.
When active, the
Start Recordingbutton turns red to indicate active recording and the text below the button changes toStop Recording.
-
With script recording active, move the DevTools window out of the way to display the https://dequelabs.github.io/aget-demo-site/. Select
Xto dismiss the dialog window. -
Switch your focus to the axe Expert Extension and select
Stop Recording. Notice that the Script panel is now populated with at least one action - where the modal dialog was dismissed.
-
Select
Stop Recordingbutton in the axe Expert left panel and review the content of the Script panel. TheStart Recordingbutton is now enabled. Note that the script contains a click event. Also note the location of theExport to AGetlink as the second of four buttons on the upper right quadrant of theScriptpanel.
-
Select
Export to CLIto start the CLI export process. axe Expert Extension displays the system file browser. Navigate to the folder where you wish to save the CLI script.Provide a meaningful file name, carefully preserving the
.jsonextension and select Save.
-
The system file browser window is dismissed and a successful save message and the name of the saved file is displayed in the lower left corner of the DevTools window.

-
Open the saved JSON file in your favorite text editor to review the CLI script contents:

