Record the flow#
- Open DevTools, then the Recorder panel. If it is not visible, find it under More tools or with the Command Menu.
- Start a new recording and give it a name. Before you start, you can name a selector attribute, such as
data-testid, that Recorder should prefer when the page has one. - Reproduce the bug. Recorder lists each click, keypress, change and navigation as a step.
- Stop the recording and replay it once to confirm the failure happens again.
Chrome DevTools: Recorder ยท Recorder features reference
Export a format the maintainer can run#
Recorder exports a recording as a JSON file, which another person can import into their own Recorder panel, or as a script for Puppeteer. The JSON form can also be replayed from the command line with the open-source @puppeteer/replay library, which reads the same format. That gives a maintainer without the reporter's browser a way to run the steps in CI or on their own machine.
| The maintainer will | Send |
|---|---|
| Replay it in their own Chrome | The JSON export |
| Run it from a terminal or CI | The JSON export, replayed with @puppeteer/replay, or the Puppeteer script |
| Read it in the bug tracker | The JSON export pasted in a code block: each step is readable |
Check the selectors before you send it#
Each step stores one or more selectors for its target: an ARIA name, a CSS selector, text, an XPath. A selector that was true on the reporter's page can be wrong on the maintainer's, because content differs between accounts.
Read the steps around the failure:
- Text selectors that include data, such as an order number or a person's name, fail on any other account. Replace the step's selector, or reproduce with test data the maintainer also has.
- Long positional CSS selectors, such as
div:nth-child(4) > ul > li:nth-child(2) > button, break after a small layout change. Prefer a test ID or an ARIA name when the step offers one. - Steps that only wait, such as a
waitForElementassertion you added, need the condition you actually observed, such as the error toast's text.
What a recording does not capture#
A recording replays actions, not state. The cookies, local storage and service worker that were present when you recorded stay in your profile. If the bug depends on them, the maintainer's replay will start from their own state and may not fail. Say so in the report, and capture the state separately: a storage snapshot, the local storage value or the service worker's version.
It also does not record what the network returned. A replay against a live server gets today's responses. When the bug depends on a response that has since changed, pair the recording with the response itself, or replay recorded responses.
Worked example: a checkout that fails after changing the quantity#
This example is fictional. A support agent reports that checkout shows "Payment failed" after changing an item's quantity. They are not a programmer, and the bug does not happen for the developer.
The agent records the flow in Recorder and exports JSON. The steps show something the written report left out: the agent changed the quantity by typing 2 into the field and pressing Enter, not by clicking the plus button. The developer imports the JSON, replays it and sees the failure. The Enter key submitted the quantity form and the checkout form together, and the second submission carried the old total.
Questions#
Can Recorder record in Firefox or Safari?
Recorder is a Chrome DevTools panel. For other browsers, write the steps down or use a cross-browser tool such as Playwright's codegen, which can record in its Firefox and WebKit builds.
Should I send the recording or a video?
Send the recording when the maintainer needs to run the steps, and add a video if the visible sequence matters. A recording without the observed failure is incomplete: add the failing step's expected and actual result in the report.
Can the recording include sensitive data?
Yes. Typed values are stored in the steps, including anything typed into a form. Use a test account, and read the JSON for passwords, card numbers and personal data before you share it.
Return to reproducing what someone else saw for the other layers a replay needs.