How to record a macro in Chrome and replay it
If you've used macros in Excel or Word, you might expect Chrome to have a Record macro button somewhere. It doesn't, at least not in the normal menus. But Chrome does include a recorder that captures clicks, typing and page navigation and plays them back. It sits inside Chrome DevTools, the developer tools panel, and it's called the Recorder.
This guide shows how to record and replay a flow with it, how to fix the usual replay failures, and where it stops being practical if you just want to repeat the same form work every day.
What the Chrome Recorder does
The Recorder panel saves a series of steps, such as "navigate to this URL", "click this element" and "type this text into this field". You can replay them on the same page later. Google's documentation describes it as a way to record, replay and measure user flows, and it was built mainly for testing and performance work. It still works for simple personal automation.
For each click or input, it stores several selectors, which are different ways of finding the element on the page. During replay it tries them in order and uses the first one that matches.
Step 1: Open the Recorder panel
1. Open the page where your task starts.
2. Open DevTools with F12, Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (Mac).
3. In DevTools, click the ⋮ (More options) menu, then More tools > Recorder.
- Or press Ctrl+Shift+P / Cmd+Shift+P to open the Command Menu, type Recorder and select Show Recorder.
The panel may be labelled as a preview feature, and menu names can change between Chrome versions.
Step 2: Record your steps
1. Click Create a new recording.
2. Give it a clear name, such as Weekly timesheet submit.
3. Click Start recording.
4. Do the task in the page as you normally would: click fields, type values, choose dropdown options, press submit.
5. Click End recording.
You now have a list of steps. Expand any step to see what it captured: the element's selectors and the value that was typed.
Step 3: Replay it
Click Replay. Chrome runs the steps on the current tab, and the Recorder shows its progress step by step.
If a replay fails or clicks the wrong thing:
- Slow it down. Open the replay settings and choose a slower speed, so you can watch where it goes wrong.
- Set a breakpoint on a step and step through the flow one action at a time.
- Edit the selectors. If a step relies on a selector that changes every visit, such as an auto-generated ID like
#field-83621, remove it and keep a steadier one, such as anarialabel or anameattribute. - Edit values. To type different text, change the value in the step's details instead of recording again.
Step 4: Export or reuse the recording
You can export a recording, for example as JSON or as a script for Puppeteer (a Node.js library for controlling Chrome). Developers use the exported file to rerun the flow outside DevTools or in automated tests. The exact export formats are listed in Chrome's Recorder features reference.
Practical example
Say you log hours in a web timesheet every Friday, and the project, task code and description are the same each time.
1. Record: open the timesheet, choose the project, type the task code, type the description, click Save.
2. Next Friday: open the page, open DevTools, open the Recorder, pick Weekly timesheet submit and click Replay.
3. Check the result before you leave the page. The Recorder doesn't confirm that the right data was saved. It only reports that each step ran.
Pitfalls to know before you rely on it
- You need DevTools open every time. That's fine for developers. For everyday office work it adds friction, and it's easy to hit the wrong thing in a panel full of developer tools.
- Recorded values are fixed. The flow types exactly what you recorded. If the client name or date changes every run, you have to edit the steps or export a script and add variables in code.
- Pages change. If the site redesigns its form or uses unstable element IDs, saved selectors break and the replay fails partway through.
- Logins, CAPTCHAs and two-factor prompts usually can't be replayed reliably. Sign in first, then start the recording after the login step.
- One page, one flow. The Recorder replays a fixed sequence. It can't do things like "copy this field from site A and paste it into site B" or "repeat for every row" unless you export it and write code.
- Sensitive data. Typed values, including anything you enter in a field, are stored in the recording and in any exported file. Don't record passwords or card numbers, and be careful where you share exports.
Other ways to repeat browser tasks
- Chrome autofill handles names, addresses and payment cards. It's the easiest option if your repeat task is only filling standard contact fields.
- A Puppeteer or Playwright script (exported from the Recorder or written from scratch) can handle variables, loops and multiple sites, but you need to be comfortable with JavaScript and the command line.
- A browser extension built for macros keeps the recorder in the toolbar instead of DevTools, which suits non-developers who repeat the same steps.
We're building Ferrywise, a Chrome extension that will let you save repeated form-filling and data-entry steps as reusable rules and run them from the toolbar, including copying a record from one site into another. It isn't available yet. If that's the gap the Recorder leaves for you, you can join the waitlist.
Summary
- Chrome's macro recorder is DevTools > More tools > Recorder.
- Record, replay, and fix failures by slowing the replay, adding breakpoints and editing selectors.
- It works best for fixed, single-page flows. Changing values, flows across several sites and daily non-technical use are where it gets awkward.