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
- Open the page you want to automate in Chrome, then open DevTools.
- 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.
- 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.
- Choose Export > Puppeteer and save the generated JavaScript file.
- 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.
#1 Best Overall
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.
Rank #2
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.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesFAQ
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.
Quick Recap
Rank #4
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.




