Recorder features reference
Published on
Discover ways to share user flows, edit them and their steps in this comprehensive features reference of the Chrome DevTools Recorder panel.
To learn the basics of working with the Recorder panel, see Record, replay, and measure user flows.
Edit user flows

On the top of the Recorder panel, there are options for you to:
Add a new recording
. Click on the + icon to add a new recording.
View all recordings
. The drop-down shows the list of saved recordings. Select the [number] recording(s) option to expand and manage the list of saved recordings.
Export a recording
. To further customize the script or share it for bug reporting purposes, you can export the user flow in one of the following formats:
- JSON file.
- Puppeteer script.
- @puppeteer/replay script.
For more information on the formats, see Export a user flow.
Import a recording
. Only in JSON format.
Delete a recording
. Delete the selected recording.
You can also edit the recording's name by clicking the edit button next to it.
Share user flows
You can export and import user flows in the Recorder. This is useful for bug reporting because you can share an exact record of the steps that reproduce a bug. You can also export and replay it with external libraries.
Export a user flow
To export a user flow:
- Open the user flow you want to export.
- Click on the Export
. button at the top of the Recorder panel.
- Select one of the following formats from the drop-down list:
- Export as a JSON file. Download the recording as a JSON file.
- Export as a @puppeteer/replay script. Download the recording as a Puppeteer Replay script.
- Export as a Puppeteer script. Download the recording as a Puppeteer script.
- Save the file.
You can do the following with each export option:
- JSON: Edit the human-readable JSON object and import the JSON file back to the Recorder.
- @puppeteer/replay: Replay the script with the Puppeteer Replay library. When exporting as a @puppeteer/replay script, the steps remain a JSON object. This option is perfect if you want to integrate with your CI/CD pipeline but still have the flexibility to edit the steps as JSON, later convert and import them back into the Recorder.
- Puppeteer script: Replay the script with Puppeteer. Since the steps are converted into JavaScript, you can have more fine-grained customization, for example, looping the steps. One caveat, you can't import this script back into the Recorder.
Export in a custom format by installing an extension
Note: This feature is available from Chrome version 104.
You can install a Chrome extension to export replay scripts in your favorite format.

For example,
- Cypress extension let's you export JSON user flows as Cypress test script. Cypress is a front end testing tool built for the modern web.
- WebPageTest extension let’s you export user flows from the Recorder directly as WebPageTest Custom scripts to measure site's performance. See Converting user flows to WebPageTest custom scripts to learn more.
- Nightwatch extension let's you export JSON user flows as Nightwatch test script. Nightwatch is an end-to-end testing solution for web applications and websites.
Advance use case: Build an extension
You can build your own Recorder extension too. See the Recorder extension API documentation to learn how to build one.
You can also refer to this extension example and install it following the steps outlined in the documentation.
Import a user flow
To import a user flow:
- Click the Import
button at the top of the Recorder panel.
- Select the JSON file with the recorded user flow.
- Click the
Replay button to run the imported user flow.
Replay with external libraries
The Puppeteer Replay is an open source library maintained by the Chrome DevTools team. It is built on top of Puppeteer. It is a command line tool, you can replay JSON files with it.
Apart from that, you can transform and replay JSON files with the following 3rd party libraries.
Transform JSON user flows to custom scripts:
- Cypress Chrome Recorder. You can use it to convert user flow JSON files to Cypress test scripts. Watch this demo to see it in action.
- Nightwatch Chrome Recorder. You can use it to convert user flow JSON files to Nightwatch test scripts.
Replay JSON user flows:
- Replay with Testcafe. You can use TestCafe to replay user flow JSON files and generate test reports for these recordings.
- Replay with Sauce Labs. You can replay the JSON files on Sauce Labs using saucectl.
Advance use case: Integrate with the Puppeteer Replay library
Similar to the 3rd party libraries above, you can build your own library on top of the Puppeteer Replay too. The Puppeteer Replay library provide ways for you to customize how a recording is run and "stringify" the user flow JSON files, that is, convert them to something else.
Edit steps
You can edit any step in the recording by clicking the button next to it.
You can also add missing steps and remove accidentally recorded ones as described below.
Add and remove steps
To add a step:
Click the
three-dot button next to any existing step.
Select Add step before or Add step after from the drop-down menu.
Configure the new step by specifying its properties.
To remove a step, select Remove from the same three-dot menu.
Configure steps
To configure a step:
Specify its type:
click
,doubleClick
, (input)change
,keyUp
,keyDown
,scroll
,close
,navigate
(to a page),waitForElement
, orwaitForExpression
.Other properties depend on the
type
value.Specify the required properties below the
type
.Click the corresponding buttons to add optional type-specific properties and specify them.
For a list of available properties, see Step properties.
To remove an optional property, click the Remove button next to it.
To add or remove an element to or from an array property, click the + or - buttons next to the element.
Step properties
Each step can have the following optional properties:
target
—a URL for the Chrome DevTools Protocol (CDP) target, the defaultmain
keyword refers to the current page.assertedEvents
that currently can only be a singlenavigation
event
Other common properties available for most of the step types are:
frame
—an array of zero-based indexes that identify an iframe that can be nested. For example, you can identify the first (0) iframe inside a second (1) iframe of the main target as[1, 0]
.timeout
—a number of milliseconds to wait before executing a step. For more information, see Adjust timeouts for steps.selectors
—an array of selectors. For more information, see Understand selectors.
Type-specific properties are:
Type | Property | Required | Description |
click , doubleClick | offsetX , offsetY | Relative to the top-left of the element content box, in pixels | |
click , doubleClick | button | Pointer button: primary | auxiliary | second | back | forward | |
change | value | Final value | |
keyDown , keyUp | key | Key name | |
scroll | x , y | Absolute scroll x and y positions in pixels, default 0 | |
navigate | url | Target URL | |
waitForElement | operator | >= | == (default) | <= | |
waitForElement | count | Number of elements identified by a selector | |
waitForExpression | expression | JavaScript expression that resolves to true |
There are two properties that make the replay pause:
The
waitForElement
property makes the step wait for the presence (or absence) of a number of elements identified by a selector. For example, the following step waits for less than three elements to be on the page that match the selector.my-class
."type": "waitForElement",
"selectors": [".my-class"],
"operator": "<=",
"count": 2,The
waitForExpression
property makes the step wait for a JavaScript expression to resolve to true. For example, the following step pauses for two seconds and then resolves to true allowing the replay to continue."type": "waitForExpression",
"expression": "new Promise(resolve => setTimeout(() => resolve(true), 2000))",
Adjust timeouts for steps
In case your page has slow network requests or lengthy animations, the replay can fail on steps that exceed the default timeout of 5000
milliseconds.
To avoid this problem, you can adjust the default timeout for each step at once or set separate timeouts for specific steps. Timeouts on specific steps overwrite the default.
To adjust the default timeout for each step at once:
Click on Replay settings to make the Timeout box editable.
In the Timeout box, set the timeout value in milliseconds.
Click
Replay to see the adjusted default timeout in action.
To overwrite the default timeout on a specific step:
Expand the step and click Add timeout.
Click on the
timeout: <value>
and set the value in milliseconds.Click
Replay to see the step with the timeout in action.
To remove a timeout overwrite on a step, click the Delete button next to it.
Understand selectors
During recording, the Recorder automatically detects two types of selectors for most of the steps: ARIA and CSS.
For more information on ARIA selectors, see Syntactic vs. semantic selectors.
For simple webpages, id
attributes and CSS class
attributes are sufficient for the Recorder to detect the selectors. However, that might not always be the case, because:
- Your webpages may use dynamic classes or ID's that change
- Your selectors may break from development changes to CSS styles or JS behavior
Common test selectors
For example, the CSS class
values might be auto-generated for applications developed with modern JavaScript frameworks (for example, React, Angular, Vue) and CSS frameworks.

In these cases, you can use data-*
attributes to create more resilient tests. There are already some common data-*
selectors that people use for automation. The Recorder supports them as well.
If you have the following common test selectors defined, the Recorder automatically detects and uses them first:
data-testid
data-test
data-qa
data-cy
data-test-id
data-qa-id
data-testing
For example, inspect the "Cappuccino" element on this demo page and see the test attributes:

Record a click on "Cappuccino", expand the corresponding step in the recording, and check the detected selectors:

Customize the recording's selector
You can customize the selector of a recording if the above doesn't work for you.
For example, this demo page uses the data-automate
attribute as the selector. Start a new recording and enter the data-automate
as the selector attribute.

Fill in an email address and observe the selector value ([data-automate=email-address]
).

Selector priority
In addition to the ARIA selector, the Recorder looks for the best CSS selector it can find by the following attributes and in the following order:
- Your custom selector attribute if you specified it at the start of the recording.
- ARIA selector if found.
- The most common attributes used for testing:
data-testid
data-test
data-qa
data-cy
data-test-id
data-qa-id
data-testing
- ID attributes, for example,
<div id="some_ID">
. - Regular CSS selectors.
Last updated: • Improve article