Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Capture an Indian E-commerce Product Page at Mobile Width with Puppeteer

Set Puppeteer’s viewport before navigation, then capture the mobile viewport, full product page, clipped region, or a single element.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set Puppeteer’s mobile viewport before navigating to the product page, then choose whether you need the initial viewport, the full page, or a single element. The example below uses a 390 × 844 CSS-pixel viewport as an illustration—not an established Indian mobile standard—and saves a full-page PNG.

Choose what the screenshot should show

Decide on the output before configuring the capture: these options produce different images.

As an Amazon Associate I earn from qualifying purchases.

  • Initial viewport: the visible portion of the page at the chosen viewport dimensions. Leave fullPage unset or set it to false.
  • Full page: the page’s full vertical content. Set fullPage: true.
  • Clipped region: a specified rectangle of the page. Pass a clip rectangle to page.screenshot().
  • One element: capture a product image, price block, or other component with an element screenshot rather than capturing the entire page.

Puppeteer’s screenshot options document these capture modes and output settings; they do not specify a canonical mobile width for Indian e-commerce pages. [ScreenshotOptions]

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

Capture a full product page at an illustrative mobile width

Install Puppeteer in your project if needed with npm install puppeteer. Save this as an ES module, for example product-mobile.mjs, and run it with node product-mobile.mjs. Replace the sample URL with the product page you are authorized to capture.

#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.****
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();

try {
  const page = await browser.newPage();

  // Illustrative dimensions in CSS pixels, not an Indian device standard.
  await page.setViewport({
    width: 390,
    height: 844,
    deviceScaleFactor: 1,
    isMobile: true,
    hasTouch: true,
  });

  await page.goto('https://example.in/product', {
    waitUntil: 'networkidle2',
  });

  await page.screenshot({
    path: 'product-mobile.png',
    fullPage: true,
  });
} finally {
  await browser.close();
}

The example configures 390 × 844 CSS pixels, enables mobile viewport behavior and touch, and uses a device scale factor of 1. It captures the full page as a PNG. Puppeteer’s viewport API also supports orientation and other device-related settings. [Viewport]

Set the viewport before navigation. Puppeteer notes that viewport changes can affect the page and that some changes may reload it. [Page.setViewport()]

Use a named device profile when that is the test target

If you need one of Puppeteer’s named device configurations, use KnownDevices and page.emulate() instead of manually choosing metrics. Emulation applies device metrics and a user agent; apply it before navigating. A profile is an emulation configuration, not proof of complete equivalence to a physical handset or its network conditions. [KnownDevices] [Page.emulate()]

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • 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.
import puppeteer from 'puppeteer';
import { KnownDevices } from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.emulate(KnownDevices['iPhone 13']);
  await page.goto('https://example.in/product', { waitUntil: 'networkidle2' });
  await page.screenshot({ path: 'product-device.png', fullPage: true });
} finally {
  await browser.close();
}

Choose a named profile only when its particular dimensions and emulated behavior suit the test. If reproducible, explicitly controlled dimensions matter more, set the viewport properties directly as in the first example.

Capture only the product element or a clipped region

Element screenshot

Use an element screenshot when the artifact should be one component rather than the page. Puppeteer scrolls the selected element into view if needed. Replace the selector with one that matches the page.

const productImage = await page.$('[data-testid="product-image"]');
if (!productImage) {
  throw new Error('Product image element was not found');
}
await productImage.screenshot({ path: 'product-image.png' });

[ElementHandle.screenshot()]

Clipped screenshot

For a rectangular portion of the page, pass a clip rectangle in page coordinates. Use positive width and height and set the coordinates to the region you want captured.

Rank #3
Sale
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.
await page.screenshot({
  path: 'product-region.png',
  clip: { x: 16, y: 120, width: 358, height: 420 },
});

Do not combine a full-page capture expectation with a small clip and assume the result is the same artifact: choose the mode that matches the intended output. The screenshot API also supports output type, quality for supported formats, output path, and transparency-related options. [Page.screenshot()] [ScreenshotOptions]

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

Make the capture more representative and repeatable

  • Pick dimensions deliberately: record width and height in CSS pixels alongside the resulting image. The illustrative 390 × 844 values above are not a universal recommendation.
  • Match device behavior to the scenario: decide whether mobile viewport behavior, touch input, a device scale factor, orientation, and a profile-derived or separately configured user agent are needed.
  • Choose a wait condition for the page: the example uses networkidle2. A page with ongoing network activity or delayed product content may need a different wait strategy; navigation completion alone does not guarantee every page-specific element is ready.
  • Keep the capture mode explicit: use fullPage: true for the whole page, omit it for the viewport, or use a clip or element screenshot for a focused artifact.
  • Use the same settings for comparisons: keep viewport, emulation, wait condition, and screenshot mode constant when comparing pages or changes. This isolates configuration differences from page differences.

Troubleshooting common capture problems

The screenshot looks like a desktop layout

Check that setViewport() or emulate() runs before goto(). Confirm the chosen width and whether isMobile is enabled. If the page was already loaded before a viewport change, set the viewport and reload or navigate again; Puppeteer documents that some viewport changes can reload the page. [Page.setViewport()]

The saved image is only the first screen

That is the default behavior when fullPage is false or omitted. Set fullPage: true for a full-page capture, or use a clip or element screenshot when you want only a particular region.

Rank #4
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • 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.

The screenshot is blank or content is missing

Confirm the URL and navigation succeeded, then check whether the page’s content appears after navigation. If a specific product component loads later, wait for its selector before taking the screenshot:

await page.waitForSelector('[data-testid="product-image"]');
await page.screenshot({ path: 'product-mobile.png', fullPage: true });

Use a selector that actually exists on the target page. A timeout waiting for a selector generally means the selector did not appear within the configured wait period, or the page did not reach the expected state.

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 element screenshot fails

Check the selector result before calling screenshot(). If no element matched, adjust the selector to the page’s markup or wait for that element to appear. Puppeteer’s element screenshot scrolls the target into view, so a prior manual scroll is not normally required. [ElementHandle.screenshot()]

Best Value
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to | Prepaid Smartphone- 6.6" 120Hz Display, 5G , 50MP Quad Pixel Camera, Long-Lasting Battery
  • 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.

The image differs after changing viewport settings

Viewport changes can affect page behavior and may trigger a reload. Configure the viewport or device profile before navigation, then capture under the same settings each time. [Page.setViewport()] [Page.emulate()]

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

Or skip the browser setup

ScreenshotNeo can return a screenshot or PDF from one request. For example, this cURL command requests a WebP screenshot of a product URL:

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

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; these steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server offers screenshot, page-info, and PDF tools for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.

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

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

ScreenshotNeo is a website screenshot API and MCP server for developers from ScreenshotNeo.

Frequently Asked Questions

Does 390 × 844 represent a standard Indian phone viewport?

No. It is an illustrative CSS-pixel configuration; the Puppeteer API documentation does not establish a universal Indian e-commerce mobile width.

Does Puppeteer device emulation guarantee the same result as a physical phone?

No. It configures device metrics and a user agent, but does not establish complete physical-device or network equivalence.

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

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.