October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Cupertino desk5 min

How to Capture Mobile Website Screenshots with Playwright on an iPhone 15

Use Playwright’s iPhone 15 device profile for mobile screenshot emulation, with clear guidance on full-page capture, image scale, version checks, and visual comparisons.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright’s iPhone 15 device profile to emulate a mobile browser, then call page.screenshot(). The profile is an emulation—not a capture from physical iPhone hardware. The named preset appears in Playwright’s CLI documentation, but available preset values can vary by installed version, so confirm it exists in your project before using it.

Configure an iPhone 15 emulation profile

Playwright device profiles simulate browser characteristics such as viewport, screen size, user agent, and touch support. They are useful for checking mobile layouts, but do not establish that a physical iPhone 15 would render the page identically. See Playwright’s emulation guide and CLI configuration.

As an Amazon Associate I earn from qualifying purchases.

For Playwright Test, add a project using the preset exported by the installed @playwright/test package:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  projects: [
    {
      name: 'iPhone 15',
      use: {
        ...devices['iPhone 15'],
      },
    },
  ],
});

This assumes the package version in your project includes the named entry. If it does not, update to a version whose registry includes it or choose another available profile; do not silently substitute guessed iPhone 15 dimensions or device values.

#1 Best Overall
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

Check the installed preset

You can inspect the registry exported by your installed package before running the test:

node --input-type=module -e "import { devices } from '@playwright/test'; console.log(devices['iPhone 15'])"

If this prints undefined, that package does not expose a preset under that name. The exact viewport, screen dimensions, user agent, and device scale factor are version-dependent; the documented workflow does not justify hard-coding them.

Capture a mobile screenshot

With the project configured, create a test such as tests/mobile-screenshot.spec.ts:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { test } from '@playwright/test';

test('capture mobile page', async ({ page }) => {
  await page.goto('https://example.com');
  await page.screenshot({ path: 'iphone-15.png' });
});

Run it with:

npx playwright test tests/mobile-screenshot.spec.ts --project="iPhone 15"

The default capture is the visible viewport. Replace the screenshot call with the following when you need the full scrollable page:

Rank #2
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%.
await page.screenshot({ path: 'iphone-15-full.png', fullPage: true });

Playwright documents these screenshot options in the Page API.

Choose full-page extent and pixel scale deliberately

Viewport or full page

  • page.screenshot({ path: 'iphone-15.png' }) captures the current viewport.
  • page.screenshot({ path: 'iphone-15-full.png', fullPage: true }) captures the full scrollable page.

Use viewport captures when comparing what fits on screen at one time. Use full-page captures to inspect long-page layout, while remembering that the result may be much taller than a phone screen.

CSS pixels or device pixels

The Page API’s scale option controls output density. css produces one image pixel per CSS pixel; device produces one image pixel per device pixel and can create considerably larger images on high-density profiles. The documented default is device. Set the option explicitly when output dimensions or file size matter:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await page.screenshot({
  path: 'iphone-15-css-pixels.png',
  fullPage: true,
  scale: 'css',
});

Make captures useful for visual comparisons

A device profile alone does not make screenshots reproducible. Playwright identifies host operating system, browser version, settings, hardware, power source, and headless mode as potential sources of rendering differences. Generate baselines and comparison captures in the same environment and keep the relevant inputs consistent. See Playwright’s visual comparison guidance.

Rank #3
Apple iPhone 15, 128GB, Blue - 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
  • Use the same Playwright package version and device preset.
  • Keep browser engine and version, operating system, and headless mode consistent.
  • Compare viewport captures with viewport captures, or full-page captures with full-page captures.
  • Use the same scale setting in both runs.

Playwright supports projects for multiple browsers and mobile device profiles; the browser documentation describes that setup. An iPhone-style emulation profile is not the same as running Safari on a physical iPhone. For bugs that depend on actual iOS or Safari behavior, arrange a separate real-device check.

Troubleshoot common capture problems

The iPhone 15 profile is undefined

Cause: The installed Playwright package’s device registry does not contain iPhone 15 under that name.

Fix: Inspect devices in the installed package as shown above. Use a profile that is present or install a release that includes the documented preset. Avoid copying numeric values from an unrelated version.

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 screenshot shows only the top of the page

Cause: Viewport capture is the default.

Fix: Pass fullPage: true if you need the entire scrollable document. If you only need a lower section, scroll to it before taking a viewport screenshot.

Rank #4
Apple iPhone 15, 128GB, Pink - 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

The image is unexpectedly large

Cause: Device-pixel scaling can produce more image pixels than CSS-pixel scaling, and full-page captures add substantial height.

Fix: Use scale: 'css' when one output pixel per CSS pixel is sufficient, and omit fullPage: true if the viewport alone answers the question.

Two captures differ despite using the same profile

Cause: Rendering can vary with the host environment and browser settings, not just the selected device profile.

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.

Fix: Run baseline generation and comparisons in a stable, matching environment; align browser version, operating system, headless mode, capture extent, and scale.

Best Value
Apple iPhone 15 Plus, 128GB, Pink - Unlocked (Renewed)
  • 6.7inch 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

The page is blank or incomplete

Cause: The site may not have finished rendering when the screenshot is taken, or it may behave differently under emulation. The basic example navigates to the URL and captures immediately after navigation completes.

Fix: Add a wait for a page element that indicates the content you need is ready, for example:

await page.goto('https://example.com');
await page.locator('main').waitFor({ state: 'visible' });
await page.screenshot({ path: 'iphone-15.png' });

Replace main with a selector that exists on the target site. A wait for visibility can help with asynchronously rendered content, but it does not guarantee that every image or animation has finished.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 offers a one-request screenshot API; see the ScreenshotNeo documentation for request options. This example saves a WebP capture of a mobile-sized viewport:

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

ScreenshotNeo’s supported options include viewport and device presets, full-page capture with lazy images loaded, output formats including PNG, JPEG, WebP, or PDF, and controls such as custom CSS, JavaScript, waits, and cookies. Its clean-shot process accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 screenshots. Learn more at ScreenshotNeo.

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

Frequently Asked Questions

Does a Playwright iPhone 15 screenshot prove the site works on a real iPhone?

No. It is an emulated device-profile capture, not a physical iPhone test. Use real-device testing when the question depends on iOS or Safari behavior.

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

Should I use CSS scale or device scale for a visual regression baseline?

Either can work; choose one deliberately and keep it identical across baseline and comparison captures. CSS scale produces one image pixel per CSS pixel, while device scale uses device pixels.

Quick Recap

Bestseller No. 1
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. 2
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, Blue - Unlocked (Renewed)
Apple iPhone 15, 128GB, Blue - 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
$410.00
Bestseller No. 4
Apple iPhone 15, 128GB, Pink - Unlocked (Renewed)
Apple iPhone 15, 128GB, Pink - 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
$414.89
Bestseller No. 5
Apple iPhone 15 Plus, 128GB, Pink - Unlocked (Renewed)
Apple iPhone 15 Plus, 128GB, Pink - 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
$438.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.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.