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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use Puppeteer’s Page.screenshot() in a Node.js script, then run the script from a scheduler such as a cron-triggered workflow. Set a consistent viewport, wait for the product content you need, save to an explicit path, and close the browser in a finally block so scheduled failures do not leave it running.

Build a Puppeteer screenshot script

Puppeteer handles browser automation and image capture; the scheduler handles repetition. Keep target URLs and stable output names together so each scheduled run writes predictable files for review, archiving, or a later workflow step.

The Puppeteer guide shows the core sequence: launch a browser, open a page, navigate, capture, and close. This runnable Node.js example adds explicit viewport settings, a selector wait, error logging, and guaranteed browser cleanup. Install Puppeteer in the project with npm install puppeteer, then save this as capture-products.js:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer');
const path = require('node:path');

const products = [
  { name: 'example-product', url: 'https://example.com/product' },
];

async function captureProduct(browser, product) {
  const page = await browser.newPage();
  try {
    await page.setViewport({ width: 1440, height: 1000, deviceScaleFactor: 1 });
    await page.goto(product.url, {
      waitUntil: 'domcontentloaded',
      timeout: 60000,
    });

    // Replace this with a selector that signals the product content is ready.
    await page.waitForSelector('main', { timeout: 30000 });

    const output = path.resolve('screenshots', `${product.name}.png`);
    await page.screenshot({ path: output, fullPage: true });
    console.log(`Saved ${product.url} to ${output}`);
  } finally {
    await page.close();
  }
}

(async () => {
  const browser = await puppeteer.launch();
  try {
    for (const product of products) {
      await captureProduct(browser, product);
    }
  } catch (error) {
    console.error('Screenshot run failed:', error);
    process.exitCode = 1;
  } finally {
    await browser.close();
  }
})();

Create the screenshots directory before running, or add directory creation to the script; Puppeteer does not create missing parent directories for a screenshot path. Run it with node capture-products.js. Puppeteer’s screenshot guide: https://pptr.dev/guides/screenshots.

#1 Best Overall
Sale
Motorola Moto g - 2026 | Unlocked | Made for US 4/128GB | 50MP Camera | Pantone Slipstream, Cellular_Phone
  • Universal unlocked. Compatible with all major U.S. carriers, including Verizon, AT&T, T-Mobile and other prepaid carriers.
  • Super-bright, super-smooth 6.7" display. See your screen clearly even outdoors in sunlight, and enjoy seamless views with a fast-refreshing 120Hz display.*
  • AI-powered camera system. Take stunning photos in any light with the 50MP camera**, look your best with a 32MP selfie cam*****, and capture extreme close-ups.
  • Superfast 5G performance. Unleash your entertainment at 5G speed*** with the MediaTek Dimensity 6300 chipset and up to 12GB of RAM with RAM Boost****.
  • Long-lasting battery + TurboPower charging. Power through day after day with a 5200mAh battery, then get hours of power in just minutes.****

Choose what to capture and when

Viewport or full page

Page.screenshot() captures the viewport by default. Set fullPage: true to capture the whole page, which is useful when a product page extends below the fold. For a consistent comparison image, prefer a fixed viewport; full-page height can change as the page content changes.

Use clip when you need a defined rectangle rather than the entire viewport. If the goal is a product card, gallery, or another single region, Puppeteer also supports ElementHandle.screenshot(); it scrolls the element into view if needed before using the page capture mechanism.

Rank #2
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Wait for the relevant state

Navigation completion does not always mean a product page has rendered the information you care about. domcontentloaded waits for parsed HTML; load waits for ordinary page resources; networkidle2 allows some ongoing requests; and networkidle0 waits for the network to become fully quiet. Analytics, websockets, or other persistent requests can prevent a zero-network wait from completing before the timeout.

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

For pages that render content after navigation, wait for a known selector or application state after goto(). Choose a selector that represents the actual product content—not just a generic page wrapper—and set a timeout so a missing element becomes a visible job failure instead of an indefinitely stalled run.

Rank #3
Samsung Galaxy A16 5G 128GB Cell Phone, Unlocked Android Smartphone, Large AMOLED Display, Durable Design, Super Fast Charging, Expandable Storage, US Version, 2025, Blue Black (Renewed)
  • Charger NOT Included, 6.7" Super AMOLED FHD+, 90Hz Refresh Rate, 385 ppi, 800 nits (HBM), 1080x2340px, 5000mAh Battery
  • 128GB, 4GB RAM, microSDXC, Exynos 1330 (5nm), Octa-Core, Mali-G68 MP2 or Mali-G57 MC2 GPU
  • Rear Camera: 50MP, f/1.8 (wide) + 5MP, f/2.2 (ultrawide) + 2MP, f/2.4 (macro), LED flash, panorama, HDR; Front Camera: 13MP, f/2.0, Android 14, up to 6 major Android upgrades, One UI 6.1
  • 3G: HSDPA 850/900/1700(AWS)/1900/2100; 4G LTE: 1/2/3/4/5/7/12/13/14/20/25/26/28/29/30/38/39/40/41/48/66/71, 5G: 2/5/25/41/66/71/77/78 SA/NSA/Sub6/mmWave - Nano-SIM + eSIM
  • US Model – Global Connectivity – Compatible with Most GSM Carriers like T-Mobile, AT&T, MetroPCS, etc. Will Also work with CDMA Carriers Such as Verizon, Straight Talk.

Set the capture options deliberately

The Puppeteer screenshot API documents options including fullPage, clip, path, type, quality, omitBackground, and captureBeyondViewport. See the ScreenshotOptions API reference and Page.screenshot() API reference (the current reference surfaced for this guide is Puppeteer 25.12.0).

  • path: writes an image to disk. A relative path resolves from the process working directory; without a path, the screenshot data is returned but not saved to a file.
  • type: PNG is the default. Choose JPEG or WebP when appropriate for your downstream use.
  • quality: applies to formats that support quality settings, not PNG.
  • omitBackground: omits the default background when a transparent capture is needed.
  • captureBeyondViewport: controls capture beyond the viewport; consider it when using a clip or other nonstandard capture bounds.

When tracking visual changes, keep the viewport, device scale, locale, and other page conditions stable. This improves comparability, but does not promise pixel-identical images across browser versions, fonts, operating systems, or changing site content.

Rank #4
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Run the script on a schedule

Put the script in a scheduled job that installs its dependencies, launches Puppeteer and Chromium, runs the capture, and then retains the output as an artifact or commits it through your repository workflow. A GitHub Marketplace third-party action listing demonstrates a cron-triggered workflow using a JSON URL list. The listing describes options including concurrency, retries, timeouts, a configurable output directory, and optional pull request creation; those are claims about that action, not general guarantees about GitHub Actions. The listing identifies version 2.1.11: GitHub Marketplace listing.

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 listing gives examples for every six hours, daily at midnight UTC, and weekly on Monday at 08:00 UTC. Configure the cadence and timezone intentionally, and verify the current scheduler’s timeout, concurrency, and artifact-retention rules in its own documentation before relying on them. Schedule syntax alone does not establish when a hosted runner will start or how long it will retain files.

Best Value
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
  • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
  • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
  • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
  • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.

Operational choices

  • Stable names: use a stable product identifier in each filename so runs do not overwrite unrelated captures.
  • Failure visibility: log the URL and error, return a failing process status, and configure the workflow to expose failed runs.
  • Retries: retry transient navigation or network failures only if a repeated attempt is useful; preserve the original failure in logs.
  • Concurrency: avoid overlapping runs writing to the same output paths, or isolate output by run.
  • Retention: decide whether the images are temporary artifacts, long-term history, or repository changes, and set retention accordingly.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

  • Screenshot file is missing: provide path and ensure its parent directory exists. A screenshot without a path returns data but does not save a file.
  • Navigation times out: the page may have continuing requests or slow resources. Try a less restrictive readiness condition such as domcontentloaded, then wait separately for the required product selector.
  • Product details are absent: navigation may have finished before client-rendered or lazy content appeared. Wait for a product-specific selector or state before capture.
  • The scheduled job fails but local runs work: check the runner’s installed dependencies, Chromium availability, working directory, permissions, timeout, and environment-specific configuration. Use an explicit output path and print it in the logs.
  • Images differ between runs: stabilize viewport and device scale, and account for changing page data, fonts, browser versions, and operating systems; Puppeteer’s capture options do not guarantee identical pixels in those conditions.
  • Browser processes remain after an error: put browser.close() in finally, as in the example, so it runs on both successful and failed captures.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return an image or PDF; its clean-shot process accepts cookie or 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 and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in headers. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.

For a one-shot capture, replace the target URL and use your API key. The API documentation is at https://screenshotneo.com/docs/.

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

ScreenshotNeo offers 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. Sign up for the free plan.

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

Frequently Asked Questions

Does Puppeteer schedule screenshots by itself?

No. Puppeteer automates the browser and captures the page; a cron job or scheduled workflow runs the script repeatedly.

Can I capture a single product element instead of the full page?

Yes. Use an element handle’s screenshot() method to capture a selected element.

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.