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

Use Puppeteer’s page.emulate() with a named device preset before opening the page, then save the screenshot with page.screenshot(). This applies the preset’s user agent and viewport metrics in the browser; it is an emulated mobile view, not a photograph from a physical phone.

Capture a mobile screenshot with a device preset

The following ES module example uses Puppeteer’s documented KnownDevices preset pattern. It emulates an iPhone 17 Pro, navigates to the target, and saves a full-page PNG:

import puppeteer, {KnownDevices} from 'puppeteer';

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

Install Puppeteer in your project before running the script. Replace https://example.com with the page to capture. The example follows Puppeteer’s guidance to emulate before navigation because emulation changes the page viewport. See the Page.emulate() documentation, KnownDevices reference, and screenshots guide.

What the preset changes

page.emulate(device) applies the device’s user-agent string and viewport metrics. Puppeteer describes it as a shortcut for setting the user agent and viewport. A device preset is useful when a test needs those values to be repeatable; it does not establish that every feature or behavior of a physical handset has been reproduced. The documented Device interface identifies the user agent and viewport as device fields.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
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.

Choose the capture extent

  • For only the visible mobile viewport, omit fullPage or set it to false.
  • For a capture extending beyond the viewport, use fullPage: true.
  • For a specific rectangular region, use the screenshot option clip.
  • For one element, locate it and call its screenshot method; an element handle’s screenshot scrolls the element into view if necessary.

Puppeteer’s default screenshot type is PNG, and the file extension can determine the output type when using path. Screenshot options also include image type, quality for supported formats, and omitBackground for a transparent background. Consult Page.screenshot(), ScreenshotOptions, and ElementHandle.screenshot() for the API details.

Wait for the page state you need

The example uses waitUntil: 'networkidle2', a wait condition shown in Puppeteer’s screenshot guide. It can be a useful starting point, but it does not prove that application-specific content, animations, or lazy-loaded images are visually ready. Pages may continue changing after navigation reaches a network condition.

Rank #2
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.

For dynamic content, add a page-specific readiness check before taking the screenshot—for example, wait for the selector that marks the content under test as present. If the target uses delayed rendering or animation, make the capture wait match the behavior you need to inspect rather than assuming a navigation event means the page is settled.

Compare mobile layouts consistently

When capturing more than one device, keep the comparison tied to the test question. Record the selected preset and compare its viewport dimensions and user agent along with the resulting responsive layout. If orientation matters, use a viewport and user agent appropriate to that case rather than treating a device name alone as proof that all device behavior is covered.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
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.

Describe results as screenshots produced under Puppeteer browser emulation. The documented device fields do not establish full reproduction of physical hardware, operating-system browser behavior, or every device-specific capability.

Troubleshooting Puppeteer mobile screenshots

The screenshot looks like a desktop layout

Check that page.emulate(...) runs before page.goto(...), and confirm you selected the intended preset. Emulation applies viewport and user-agent values; setting them only after navigation can mean the page has already initialized at desktop dimensions.

Rank #4
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black
  • PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
  • TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
  • NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
  • MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
  • HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone

Dynamic content or images are missing

networkidle2 is not a guarantee that every application update or lazy-loaded resource is complete. Wait for a page-specific selector or other readiness condition relevant to the content you need, then capture.

An element screenshot fails

Puppeteer reports an error if the element handle has become detached. Locate the element after the page has reached the needed state, and use a current handle before calling its screenshot method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Tracfone Moto g Play 2024 Prepaid Phone with a 1-Yr Plan Included
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
  • ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
  • CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
  • PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
  • 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US

The image contains more or less than intended

Choose the capture extent explicitly: viewport-only by default, fullPage: true for the full page, clip for a rectangle, or an element handle screenshot for a single element.

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 website screenshot through one GET request, without configuring Puppeteer locally. This example saves a WebP screenshot; replace the URL with the page you need. See the ScreenshotNeo API documentation for parameters and response details.

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

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response indicates the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month, with no card required.

Frequently Asked Questions

Can Puppeteer’s device emulation replace testing on a real phone?

No. It captures a browser view using emulated device metrics and a user agent, not a physical handset.

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.

How do I save only the visible mobile viewport?

Call page.screenshot({path: 'mobile.png'}) without enabling fullPage.

Quick Recap

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.