Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober 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 PC×
Skip to content
World desk6 min

How to Capture the Same Web Page at Multiple Mobile Device Sizes Automatically

Run one URL through a repeatable matrix of Playwright mobile viewports or device profiles, then save screenshots for review or visual regression testing.

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.

Use Playwright to open the same URL in a series of browser contexts, each configured with a mobile device profile or explicit viewport dimensions, and save a screenshot from each run. Set the viewport before navigating so the page loads at the intended size. Use device emulation when mobile behavior matters—not just width—and keep the browser environment consistent when comparing results.

What you need to decide before capturing

Start by defining the sizes and behaviors you want to inspect. A viewport-only matrix is useful for responsive layout checks; a device profile also supplies settings such as user agent, screen size, device scale factor, mobile behavior, and touch support. Playwright describes its device options as emulation, not a guarantee that every result will match a physical phone.

As an Amazon Associate I earn from qualifying purchases.

  • Choose widths and heights: Record both dimensions for custom viewports. Select sizes relevant to your audience and site rather than assuming one mobile size represents all phones.
  • Choose profiles when needed: Use a Playwright device descriptor if the page’s behavior depends on mobile settings such as touch or device characteristics. You can override its viewport when necessary.
  • Choose the capture area: A viewport screenshot shows what fits on screen; a full-page screenshot includes the scrollable page. These answer different review questions.
  • Choose the output: Save files for manual review, or use Playwright Test screenshot assertions for visual comparisons.

Playwright’s documentation says, “With Playwright you can test your app on any browser as well as emulate a real device such as a mobile phone or tablet.” See Playwright device emulation.

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

Capture one URL across viewport sizes with Playwright

The example below uses Playwright Test and a list of viewport dimensions. It creates a fresh page at each size, applies the viewport before navigation, waits for the page’s load event, then saves a viewport screenshot. Replace the URL and dimensions with the page and sizes you need. Install Playwright Test in the project with npm init playwright@latest if it is not already configured.

#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.
import { test } from '@playwright/test';

const url = 'https://example.com';
const viewports = [
  { name: 'mobile- narrow', width: 320, height: 720 },
  { name: 'mobile-medium', width: 390, height: 844 },
  { name: 'mobile-wide', width: 430, height: 932 },
];

test('capture page at multiple mobile viewport sizes', async ({ browser }) => {
  for (const viewport of viewports) {
    const context = await browser.newContext({
      viewport: { width: viewport.width, height: viewport.height },
    });
    const page = await context.newPage();
    await page.goto(url, { waitUntil: 'load' });
    await page.screenshot({
      path: `screenshots/${viewport.name}-${viewport.width}x${viewport.height}.png`,
    });
    await context.close();
  }
});

Ensure the screenshots directory exists before running the test, or create it in your setup. Run the test with npx playwright test. If the application renders important content after the load event, replace that wait with an application-specific condition, such as await page.getByText('Ready').waitFor(), or wait for a known selector. Avoid arbitrary delays unless the page offers no reliable readiness signal.

Use a device profile when width alone is not enough

Playwright’s device descriptors can provide more than a viewport. Select a descriptor from playwright.devices and pass it to browser.newContext; set or override its viewport before navigation if you need a custom size. For example:

import { test, devices } from '@playwright/test';

const device = devices['iPhone 13'];

test('capture with mobile emulation', async ({ browser }) => {
  const context = await browser.newContext({
    ...device,
    viewport: { width: 390, height: 844 },
  });
  const page = await context.newPage();
  await page.goto('https://example.com', { waitUntil: 'load' });
  await page.screenshot({ path: 'screenshots/phone-emulation.png' });
  await context.close();
});

Device names and their settings depend on the installed Playwright version. Check the current descriptors in the Playwright emulation documentation. If you need reproducible coverage, explicitly record the profile and dimensions used for each capture.

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

Capture the full page instead of just the viewport

To include content below the fold, set fullPage: true in the screenshot call:

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.
await page.screenshot({
  path: `screenshots/${viewport.name}-full.png`,
  fullPage: true,
});

Full-page images are helpful for reviewing long layouts, but they do not show the initial viewport alone. Playwright documents viewport and full-page capture in its Page API.

Make repeated captures useful for review or regression testing

Keep the comparison conditions stable

Screenshot output can vary with the operating system, browser settings, hardware, headless mode, and other environment factors. For meaningful comparisons, use the same browser/runtime environment as the baseline and keep the viewport, device settings, page state, and capture timing consistent. Playwright’s visual comparison documentation explains screenshot assertions and environment-related variation.

If the page contains animations, rotating content, timestamps, or other changing elements, make the capture state deterministic—for example, use test data or wait for a stable application state. Otherwise a visual difference may reflect dynamic content rather than a responsive-layout change.

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

Use assertions for automated visual regression

For a visual check in Playwright Test, save a named snapshot instead of only writing an image file:

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.
await expect(page).toHaveScreenshot(`${viewport.name}.png`);

Import expect from @playwright/test and run the test in the same environment that generated the approved baseline. A changed screenshot should be reviewed before updating the baseline; not every pixel difference is a defect.

When a hosted workflow is a better fit

If you want an interactive session rather than a scripted loop, BrowserStack Responsive Testing documents preset or custom resolutions, side-by-side responsive views, and screenshot capture for an individual device or all displayed devices. See BrowserStack Responsive Testing.

For hosted visual regression, Percy documents responsive snapshots at multiple widths and responsive DOM snapshot configuration. It states that each responsive width counts as a separate screenshot against monthly usage; confirm current plan terms directly before relying on a particular allowance. See Percy responsive visual testing and responsive DOM snapshots.

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.

Or skip the browser setup

ScreenshotNeo can return a screenshot or PDF from one GET request. Use it when you want a hosted capture rather than maintaining browser automation. Its viewport parameters can be supplied for individual captures, so request the same URL once per size you want; see the API documentation.

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
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 shot-390x844.webp

Repeat the request with the next width, height, and output filename. ScreenshotNeo’s parameter names used by other screenshot APIs also work, which can simplify switching. ScreenshotNeo’s clean-capture options accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response includes X-Page-Verdict and X-Billed headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 screenshots. Sign up for free ScreenshotNeo access.

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

Troubleshooting and practical limits

The screenshots all look like the same size

Check that each context receives its own viewport before navigation and that the output filenames differ. If you reuse a page and resize it, the site may have already initialized behavior at the old size; creating a new context per configuration avoids that issue.

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

Mobile navigation or touch behavior does not appear

A custom viewport changes the visible dimensions but does not by itself establish every mobile characteristic. Use a device descriptor when the behavior depends on settings such as user agent or touch support, and verify the emulated settings in the Playwright documentation.

The capture is blank or misses content

Do not assume the load event means a client-rendered page is ready. Wait for a selector or state that indicates the content you need has appeared. If an external resource fails, investigate the page and network conditions rather than increasing the delay blindly.

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

Visual comparisons fail inconsistently

Run baseline and comparison captures with the same browser version and environment. Check for dynamic page content, animations, fonts, and resource loading before treating a difference as a layout regression. Playwright notes that screenshot results may differ across systems and settings.

Why does mobile emulation differ from a phone?

Emulation configures browser parameters; it does not establish universal equivalence to physical-device testing. Use real-device testing when the question depends on hardware-specific rendering, operating-system behavior, or a physical interaction that emulation cannot establish.

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

Frequently Asked Questions

Can I capture different mobile sizes in parallel?

Yes, separate Playwright contexts can be run concurrently, but parallelism increases resource use. Begin sequentially, then add bounded concurrency if the test environment has capacity.

Does every responsive width count as a separate Percy screenshot?

Percy’s responsive testing documentation says each responsive width counts as a separate screenshot against monthly usage. Current plan allowances should be checked with Percy.

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.

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
PC Slower Than It Used to Be?Free scan - under a minute

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.