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

Set Puppeteer’s userDataDir launch option to a writable directory reserved for automation, then navigate to the page and call page.screenshot(). Use the user-data directory root—not a profile subfolder such as Default—and do not run another Chrome process against that same directory at the same time.

Minimal Windows example

Install Puppeteer in your Node.js project, then save this as screenshot.js. Replace the illustrative profile path with a directory your Windows account can write to.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    userDataDir: 'C:\Users\YourName\AppData\Local\Puppeteer\ChromeProfile',
  });

  try {
    const page = await browser.newPage();
    await page.goto('https://example.com', { waitUntil: 'networkidle2' });
    await page.screenshot({ path: 'capture.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

Run it from the project directory with node screenshot.js. The example waits for network activity to settle before capture and saves a full-page PNG as capture.png in the current working directory. Puppeteer documents userDataDir as a launch option in its LaunchOptions interface. Chromium’s equivalent Windows command-line setting is chrome.exe --user-data-dir=c:\foo (Chromium User Data Directory).

User-data directory versus Chrome profile folder

userDataDir identifies the browser’s user-data root: the directory that holds Chrome’s profile data. It is not usually the individual profile directory beneath that root, such as Default or Profile 1. Give Puppeteer the root directory you want it to use; Chrome manages the profile data inside it.

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

The path in the example is only illustrative, not a required Windows location. Choose a dedicated automation directory and ensure the account running the script has write access. Avoid pointing automation at your everyday Chrome data: a separate directory makes the automated session independent and avoids contention with normal browsing.

Choose the browser executable

With the standard puppeteer package, Puppeteer downloads a compatible Chrome for Testing browser by default. That is the simplest choice when you do not need to control Chrome separately. If you use a separately managed Chrome installation, set executablePath in the launch options, for example:

const browser = await puppeteer.launch({
  executablePath: 'C:\Program Files\Google\Chrome\Application\chrome.exe',
  userDataDir: 'C:\Users\YourName\AppData\Local\Puppeteer\ChromeProfile',
});

The path shown is an example; use the actual location of the executable on your system. Puppeteer guarantees compatibility only with its bundled browser, so a separately updated Chrome gives you update control but also makes browser-version compatibility your responsibility. The official installation guide explains browser installation; puppeteer-core does not download Chrome. If package installation scripts were blocked and the bundled browser was not installed, the guide documents npx puppeteer browsers install as a manual installation step.

Rank #2
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
  • 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
  • 4GB DDR4 System Memory; 128GB Solid State Drive
  • 11.6" HD (1366 x 768) Multi-Touch Display
  • Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
  • Windows 11 Pro

Save the capture you need

Puppeteer’s screenshot API is Page.screenshot() (Screenshots guide). Choose the capture mode based on the output you need:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Need Option Result
Save an image file path: 'capture.png' Writes the screenshot to that path. If path is omitted, the API returns image bytes instead.
Capture the full page fullPage: true Captures beyond the current viewport.
Capture a specific region clip Restricts capture to the specified rectangle.
Capture one element Call screenshot() on its ElementHandle Captures that element; Puppeteer’s guide says it tries to scroll a hidden element into view.

PNG is the documented default image type. The quality option applies to image formats other than PNG. See the ScreenshotOptions interface for the current option details.

Fix common Windows launch failures

Chrome says the profile is already in use

Puppeteer checks for a Windows profile lock. If another Chrome process is using the same userDataDir, stop that process or choose another directory, then retry. Do not try to make two active Chrome sessions share the automation profile. The lock handling is visible in Puppeteer’s BrowserLauncher source.

Rank #3
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

The profile cannot be written

Use a directory writable by the Windows account running Node.js. Check the path, folder permissions, and whether a security policy or another process is preventing access. Puppeteer distinguishes an unwritable profile from an already-running browser, so follow the actual launch error rather than treating both as the same problem.

Chrome fails under an organization extension policy

Puppeteer passes --disable-extensions by default. The troubleshooting guide notes that some Chrome policies enforce extensions and can conflict with that default; for that policy conflict, it documents enableExtensions: true as a workaround:

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.
const browser = await puppeteer.launch({
  userDataDir: 'C:\Users\YourName\AppData\Local\Puppeteer\ChromeProfile',
  enableExtensions: true,
});

Use this only when the reported failure matches the extension-policy issue. Details are in Puppeteer’s Troubleshooting guide.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Downloaded Chrome reports a sandbox permission error

Puppeteer’s troubleshooting documentation says that, beginning with v22.14.0, installation attempts to configure Windows sandbox permissions using Chrome’s setup.exe. Verify your Puppeteer version and the exact error before changing permissions. For older installations or persistent errors, the guide documents an icacls command for the Puppeteer Chrome cache and recommends the more restrictive SID in high-security environments. Follow the instructions for your specific case in the official troubleshooting guide rather than applying broad permission changes.

The Chrome executable is missing

If you use puppeteer-core or manage the browser yourself, install a browser and provide its path with executablePath. The regular puppeteer package normally downloads a compatible browser; if that step was skipped, use the manual browser-install command described above.

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

Or skip the browser setup

For a screenshot from one request, ScreenshotNeo avoids managing a local Chrome installation or user-data directory. Its API accepts a URL and returns an image or PDF. For example, save a WebP capture with cURL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
  • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
  • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
  • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
  • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
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 parameters and setup. It accepts cookie or consent banners 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 the response identifies the page verdict and billing status in headers. An MCP server gives AI agents screenshot, page-info, and PDF-capture tools. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.

Sign up for ScreenshotNeo’s free plan to try it without a card.

Frequently Asked Questions

Does Puppeteer support a custom Chrome user-data directory on Windows?

Yes. Pass the directory as the userDataDir option to puppeteer.launch().

Can two Chrome processes use the same Puppeteer user-data directory at once?

No. Close the process holding the profile lock or launch Puppeteer with a different directory.

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

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$247.99
Bestseller No. 2
Dell Latitude 3190 11.6' HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core; 4GB DDR4 System Memory; 128GB Solid State Drive
Bestseller No. 3
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$299.99

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.