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

Use Puppeteer’s KnownDevices preset and call page.emulate() before opening the site. This sets the emulated device metrics and user-agent information; then navigate to the page and capture it with page.screenshot().

Emulate an iPhone and capture a screenshot

Install Puppeteer in your project, then use a device preset. The current Puppeteer reference demonstrates the iPhone 17 Pro entry; choose the preset that matches the device you want to approximate.

import puppeteer, { KnownDevices } from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  const iPhone = KnownDevices['iPhone 17 Pro'];

  await page.emulate(iPhone);
  await page.goto('https://example.com', { waitUntil: 'networkidle2' });
  await page.screenshot({ path: 'iphone.png', fullPage: true });
} finally {
  await browser.close();
}

page.emulate(device) applies the device’s viewport metrics and user agent. Puppeteer documents it as a shortcut for setting the user agent and viewport. Call it before page.goto(): Puppeteer notes that changing viewport size can cause a page resize, which some sites may not expect. See the Page.emulate() documentation and KnownDevices reference.

The device reference can change with Puppeteer versions, so consult the installed version’s live documentation if you need an exact preset. The cited reference does not establish the iPhone 17 Pro preset’s precise dimensions; avoid assuming a specific width, height, or device pixel ratio without checking the preset you are using.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
  • This phone is unlocked and compatible with any carrier of choice on GSM and CDMA networks (e.g. AT&T, T-Mobile, Sprint, Verizon, US Cellular, Cricket, Metro, Tracfone, Mint Mobile, etc.).
  • Please check with your carrier to verify compatibility.
  • The device does not come with headphones or a SIM card. It does include a generic (Mfi certified) charging cable.
  • Tested for battery health and guaranteed to have a minimum battery capacity of 80%.

Choose the right capture area

Capture the visible viewport

By default, page.screenshot() captures the current viewport. You can make that intent explicit with fullPage: false:

await page.screenshot({ path: 'iphone-viewport.png', fullPage: false });

Capture the full page

Set fullPage: true to capture beyond the visible viewport:

await page.screenshot({ path: 'iphone-full-page.png', fullPage: true });

Capture a particular region

Use the screenshot option clip when you need a defined rectangle rather than the whole viewport or page. The screenshot API also supports an output path, image type, quality where applicable, and omitBackground. If you do not provide a path, page.screenshot() returns image data. Check the ScreenshotOptions reference for the available options in your Puppeteer version.

Rank #2
Apple iPhone 16, 128GB, Pink - Unlocked (Renewed)
  • 6.1" Super Retina XDR OLED, HDR10, Dolby Vision, 1000nits (typ), 2000nits (HBM), 2556x1179px at 460ppi, 3561mAh Battery
  • 128GB 8GB RAM, Apple A18 (3nm), Hexa-core (2x4.04 GHz + 4x2.20 GHz), Apple GPU 5-core, 16‑core Neural Engine
  • Rear camera: 48MP, f/1.6, wide + 12MP, f/2.2, ultrawide, Front Camera: 12MP, f/1.9, wide, iOS 18, upgradable to iOS 18.5
  • 4G LTE: 1/2/3/4/5/7/8/12/13/14/17/18/19/20/25/26/28/29/30/32/34/38/39/40/41/42/48/53/66/71, 5G: n1/2/3/5/7/8/12/14/20/25/26/28/29/30/38/40/41/48/53/66/70/71/75/76/77/78/79 - Dual eSIM
  • Unlocked for freedom to choose your carrier. Compatible with both GSM & CDMA networks. The phone is unlocked to work with all GSM Carriers & CDMA Carriers Including AT&T, T-Mobile, Verizon, Sprint., Etc.

Wait for the page content you need

The example uses waitUntil: 'networkidle2', which the Puppeteer screenshot guide demonstrates as one possible navigation condition. It is not a guarantee that every site’s dynamic content is ready: pages may load content after navigation or in response to scripts and user interaction.

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

If the screenshot misses a known element, wait for that element before capturing:

await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.waitForSelector('.page-content');
await page.screenshot({ path: 'iphone.png', fullPage: true });

Replace .page-content with a selector that identifies content the page actually renders. Choose a readiness condition based on the site and the content that matters to your screenshot. The Puppeteer screenshots guide covers screenshot capture and navigation examples.

Rank #3
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
  • 6.1inch Super Retina XDR display. Aluminum with color-infused glass back. Ring/Silent switch
  • Dynamic Island. A magical way to interact with iPhone. A16 Bionic chip with 5-core GPU
  • Advanced dual-camera system. 48MP Main | Ultra Wide. Super-high-resolution photos (24MP and 48MP). Next-generation portraits with Focus and Depth Control. 4X optical zoom range
  • Emergency SOS via satellite. Crash Detection. Roadside Assistance via satellite
  • Up to 26 hours video playback. USB C, Supports USB 2. Face ID

What Puppeteer’s iPhone emulation does—and does not—test

Puppeteer applies device metrics and user-agent information through Chromium’s browser automation APIs. It is useful for checking responsive layouts under the selected emulated settings, but it does not run the site on iPhone hardware or in iOS Safari. Chrome describes DevTools device mode as an approximation running on a desktop. If behavior depends on iOS or a physical device, verify it on an actual iPhone as well; an emulated screenshot alone cannot confirm that behavior. See Chrome’s device mode explanation.

When to use a preset or custom device settings

A preset is convenient when you want a named device configuration. If you are comparing presets or defining custom settings, make sure the configuration matches the behavior you need. Relevant dimensions include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Target model: select the intended iPhone preset rather than treating every iPhone as the same device.
  • Viewport width and height: these determine the page’s layout viewport.
  • Device pixel ratio: this affects the relationship between CSS pixels and screenshot pixels.
  • User agent: sites may serve different content based on it.
  • Mobile and touch behavior: viewport sizing, touch simulation, and device pixel ratio are distinct emulation considerations.
  • Orientation: choose portrait or landscape to match the test.
  • Capture scope: decide whether you need the viewport, full page, or a clipped rectangle.

Puppeteer’s Device type includes a user-agent string and viewport. The exact preset values depend on the entry provided by the Puppeteer version you use; consult its KnownDevices reference rather than hard-coding unverified dimensions.

Rank #4
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed)
  • This pre-owned product is not Apple certified, but has been professionally inspected, tested and cleaned by Amazon-qualified suppliers.
  • There will be no visible cosmetic imperfections when held at an arm’s length.
  • This product is eligible for a replacement or refund within 90 days of receipt if you are not satisfied.
  • Product may come in generic Box.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common screenshot problems

The page has a desktop layout

Check that you called page.emulate(iPhone) before page.goto() and that the selected preset exists in your installed Puppeteer version. A page may also use signals beyond viewport and user agent, so emulation does not guarantee identical behavior to iOS Safari.

The screenshot is blank or content is missing

Navigation completion does not necessarily mean all dynamic content has rendered. Try waiting for a meaningful selector with page.waitForSelector(), or select a navigation readiness condition appropriate to the page. Avoid assuming a single wait condition works for every site.

The screenshot shows only the first screen

That is the default viewport capture. Set fullPage: true for a full-page image, or use clip for a specific rectangle.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Apple iPhone 16e, 128GB, Black - Unlocked (Renewed)
  • 6.1" Super Retina XDR OLED, HDR10, 800 nits (HBM), 1200 nits (peak), 2532x1170px at 460ppi, 4005mAh Battery
  • 8GB RAM, Apple A18 6-core CPU (2 performance + 4 efficiency cores), Apple GPU 4-core, 16‑core Neural Engine
  • Rear camera: 48MP, f/1.6, wide, Front Camera: 12MP, f/1.9, wide, iOS 18.3.1, upgradable to iOS 18.5
  • Connectivity: Global 4G LTE, Sub-6 GHz 5G, LTE, Wi-Fi 6, Bluetooth 5.3, NFC, USB-C, Wireless Charging (7.5W). (does not have mmWave 5G or MagSafe or physical SIM card) - Dual eSIM Only
  • Unlocked for freedom to choose your carrier. Compatible with both GSM & CDMA networks. The phone is unlocked to work with all GSM Carriers & CDMA Carriers Including AT&T, T-Mobile, Verizon, Straight Talk., Etc.

The output file is not created

Ensure the screenshot call includes a writable path, such as iphone.png. If you omit the path, Puppeteer returns image data instead of writing a file.

Or skip the browser setup

If your goal is a website screenshot rather than testing Puppeteer itself, ScreenshotNeo offers a screenshot API and MCP server. Its API accepts a URL in one GET request; the output can be PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation.

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

ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Sign up for 1,000 free screenshots a month with no card.

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

Frequently Asked Questions

Can Puppeteer emulate an iPhone without a physical device?

Yes. Puppeteer applies device metrics and user-agent information in Chromium. Use a physical iPhone separately when you need to confirm iOS- or hardware-specific behavior.

Does Puppeteer’s iPhone preset guarantee the same result as iOS Safari?

No. Desktop browser emulation is an approximation; it does not run iOS Safari.

Quick Recap

Bestseller No. 1
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
Apple iPhone 14, 128GB, Midnight - Unlocked (Renewed)
Please check with your carrier to verify compatibility.; Tested for battery health and guaranteed to have a minimum battery capacity of 80%.
$300.00
Bestseller No. 3
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
Apple iPhone 15, 128GB, Black - Unlocked (Renewed)
Dynamic Island. A magical way to interact with iPhone. A16 Bionic chip with 5-core GPU; Emergency SOS via satellite. Crash Detection. Roadside Assistance via satellite
$405.00
Bestseller No. 4
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed)
Apple iPhone 13, 128GB, Midnight - Unlocked (Renewed)
There will be no visible cosmetic imperfections when held at an arm’s length.; Product may come in generic Box.
$262.00

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.