October 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 NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Record a Browser Screencast with Puppeteer

Puppeteer’s experimental page.record() API records browser activity to MP4. Learn the documented workflow, how to stop and close cleanly, and how it differs from deprecated screencast().
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Puppeteer’s experimental page.record() API to save browser activity as an MP4. Navigate to the page, start the recording, perform the interactions you want to show, then call recorder.stop() before closing the browser. The current Page API marks page.screencast() deprecated and directs users to record().

Record a browser screencast with page.record()

The documented workflow is to start recording with a file path, run the browser actions that should appear in the video, and stop the returned recorder. This example uses Puppeteer’s bundled browser and closes resources even if navigation or an interaction fails:

As an Amazon Associate I earn from qualifying purchases.

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.goto('https://example.com');

  const recorder = await page.record({path: 'recording.mp4'});
  try {
    // Perform the interactions to capture here.
    await page.click('button');
  } finally {
    await recorder.stop();
  }
} finally {
  await browser.close();
}

Save the code in a JavaScript file in a project with Puppeteer installed, then run it with Node.js. Replace the example URL and selector with the page and action you need to demonstrate. The browser should remain open while recording; stopping the recorder finalizes the capture before browser shutdown. Puppeteer’s API reference describes the result as an MP4 video stream: Page.record().

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

What to know about the recording API

record() is experimental

The current Page API labels record() experimental, so its status or behavior may change. Check the API reference for the Puppeteer version installed in your project before relying on it in a long-lived workflow: Puppeteer Page API.

Use Puppeteer’s bundled browser for reproducibility

Puppeteer guarantees operation with its bundled browser. You can point launch() at a separately installed browser with a custom executablePath, but Puppeteer documents that choice as being at your own risk. The reviewed record() documentation does not establish a minimum Chrome version, so do not infer one from the older screencast API.

Stop the recorder explicitly

Call await recorder.stop() before closing the browser. Placing it in a finally block helps ensure cleanup when an action throws; the outer finally likewise closes the browser. This ordering follows Puppeteer’s documented example: Recording API.

Why not use page.screencast()?

Puppeteer marks page.screencast() deprecated and directs readers to page.record(). Do not carry over legacy details as if they were requirements for the current API. The legacy reference says screencast() works in Chrome 153+, defaults to WebM with VP9 at 30 FPS, and requires ffmpeg; those notes apply to that deprecated method, not to the documented record() flow. Its option list—including format, FPS, crop, scale, speed, quality, and path—belongs to the legacy ScreencastOptions reference.

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

Choose video or a still screenshot

A screencast is appropriate when the deliverable must show movement, navigation, or interaction over time. Use page.screenshot() when you need a still image instead; screenshot options include full-page and clipped captures, but screenshots do not create video. See the Page.screenshot() API reference.

Or skip the browser setup

If you need a still website capture rather than a video of browser activity, ScreenshotNeo can return a PNG, JPEG, WebP, or PDF from one GET request. It is a screenshot API, not a replacement for recording moving interactions.

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

See the ScreenshotNeo API documentation for request details. It removes known cookie-consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

The recording file is missing or incomplete

  • Confirm that the path in page.record({path: 'recording.mp4'}) is the intended destination and that the process can write there.
  • Ensure the recorder is stopped with await recorder.stop() before browser.close(); closing the browser first interrupts the documented sequence.

An interaction fails while the recording is running

Check that the selector exists on the loaded page and that the control is ready to receive input. Keep the recorder stop and browser close calls in finally blocks so an action error does not skip cleanup.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

The installed browser behaves differently

Start with Puppeteer’s bundled browser, the configuration for which Puppeteer guarantees operation. A custom executablePath is not covered by that guarantee. The reviewed record() reference does not specify a Chrome minimum; verify compatibility against the reference for your installed Puppeteer release rather than relying on requirements documented for deprecated screencast().

You need a particular codec or capture setting

The reviewed record() reference establishes an MP4 stream and a path-based example, but it does not establish that the legacy screencast tuning controls apply. Consult the API reference for your installed version; do not assume format, fps, crop, scale, speed, or quality options are supported by record().

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.