DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

How to Record Puppeteer Scripts with Chrome DevTools Recorder

Use Chrome DevTools Recorder to capture browser actions and export a Puppeteer script. Learn which format to choose and how script recording differs from MP4 video and performance tracing.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To turn browser actions into Puppeteer code, record the flow in Chrome DevTools Recorder, then select Export > Puppeteer. Choose Export > JSON instead if you need a flow you can edit and import back into Recorder. If by “record” you mean save a video of the page, Puppeteer has a separate experimental page.record() API that produces an MP4 stream.

Record browser actions and export a Puppeteer script

  1. Open the page you want to automate in Chrome, then open DevTools.
  2. Open the Command menu with Command+Shift+P on macOS or Control+Shift+P on Windows, Linux, or ChromeOS. Search for Recorder panel and select it. Alternatively, use More options > More tools > Recorder panel. See Chrome DevTools Recorder overview.
  3. In Recorder, start a new recording and perform the actions in the page that make up your flow. Recorder captures the steps so you can replay, edit, and export the flow.
  4. Choose Export > Puppeteer and save the generated JavaScript file.
  5. Review the generated code and adapt it for the intended automation or test. To update the displayed export after changing the flow, edit the recording in Recorder.

Chrome’s Recorder export documentation describes Puppeteer output as customizable JavaScript that can be replayed with Puppeteer. The exact DevTools labels may change as Chrome evolves.

Choose the right export format

Output Use it when Important distinction
Puppeteer JavaScript You want editable code to customize and run with Puppeteer. It cannot be imported back into Recorder.
JSON You want a human-readable flow that you can edit, import back into Recorder, or replay with tooling. This preserves the recorded flow as data rather than exporting ordinary Puppeteer JavaScript.
Puppeteer Replay You want to replay a Recorder-created JSON flow through the Puppeteer Replay library. Puppeteer Replay, maintained by the Chrome DevTools team, provides APIs to replay and stringify Recorder-created recordings.
Puppeteer for Firefox You need the separate Firefox-oriented export format documented by Chrome. It is associated with WebDriver BiDi and can run on Chrome and Firefox; confirm support for the Puppeteer version you plan to use.
Puppeteer with Lighthouse analysis You want exported code that includes Lighthouse analysis. This is an analysis-oriented export, not just a plain recorded interaction script.

Make the generated script useful

A recorded flow is a starting point, not a guarantee that the resulting automation is robust in every environment. Inspect the steps and adapt them to your test’s purpose before relying on the script. If you need a recording that you can revise in DevTools and export again, keep the Recorder flow as JSON; the Puppeteer JavaScript export does not round-trip back into Recorder.

Script recording, page video, and performance tracing are different

  • Recorder export captures user interactions and converts the flow into automation-oriented output such as Puppeteer JavaScript or JSON.
  • page.record() records page activity as an MP4 stream; it does not turn clicks into a Puppeteer script.
  • Puppeteer tracing writes diagnostic performance data for inspection in Chrome DevTools or a timeline viewer. It is neither an interaction script nor an MP4 video, and only one trace can be active per browser.

Record page activity as an MP4 with Puppeteer

If your goal is video evidence rather than generated automation code, Puppeteer 25.12.0 documents the experimental page.record() API. It returns a screen recording as an MP4 stream; call stop() to finish. Consult the Puppeteer 25.12.0 Page.record() API and verify compatibility with your Chrome and Puppeteer versions before adopting it.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Page API marks screencast() obsolete and directs users to Page.record(). Its documentation says screencast requires Chrome 153 or later and ffmpeg. Since record() is experimental, those version details and availability should be checked against the environment you will run.

Troubleshooting common recording problems

  • Recorder panel does not appear: Open DevTools’ Command menu and search for “Recorder panel,” or use More options > More tools > Recorder panel.
  • You need to re-import the generated file: Export JSON rather than Puppeteer JavaScript. The JavaScript export cannot be imported back into Recorder.
  • Your changed code view does not reflect an edited flow: Make the change in the Recorder flow, then review or export the updated code.
  • You expected a video but received automation steps: Recorder exports flows and scripts; use the separate experimental page.record() API for MP4 page recording.
  • You expected a script or video from tracing: Tracing creates a diagnostic trace file. It is for performance investigation, not interaction automation or screen video.
  • page.record() or screencast is unavailable in your setup: Check the Puppeteer and Chrome versions in use. The documented API is experimental, and the older screencast API is marked obsolete with Chrome 153+ and ffmpeg noted in its reference.

Or skip the browser setup

If you need a website screenshot rather than a recorded interaction script, ScreenshotNeo takes a screenshot or PDF with one GET request. It accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server includes tools for AI agents: take_screenshot, get_page_info, and capture_pdf.

For example, this cURL request saves a WebP screenshot of Stripe. Find the API details in the ScreenshotNeo documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo’s Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for free and get 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

FAQ

Can I import a Puppeteer script exported from Recorder back into Recorder?

No. Export JSON if you need a flow that can be imported back into Recorder.

Does Puppeteer’s video API create automation code?

No. page.record() records page activity as MP4; use Recorder’s Puppeteer export to generate automation code.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.