DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon 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

Best Playwright Settings for Accurate Mobile Website Screenshots

Use a deliberate device profile, fixed viewport, consistent screenshot scale, and stable rendering environment for dependable Playwright mobile screenshots.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For reliable mobile screenshots, start with the Playwright device profile that matches the browser and device conditions you want to test, preserve its viewport unless you have a clear reason to override it, and keep screenshot scale and the rendering environment consistent. A device preset is more than a screen size: it can include a user agent, screen dimensions, viewport, and touch behavior. Emulation is useful for repeatable checks, but it does not guarantee pixel-identical results on every physical phone.

Configure a mobile profile and fixed viewport

Playwright’s device descriptors bundle settings that influence how a site responds, rather than just changing the apparent width of the page. Select the profile closest to the browser and device conditions under test. The official guide demonstrates devices['iPhone 13'] as an example; it is not a universal profile for all iPhones or mobile browsers. See Playwright’s emulation guide.

As an Amazon Associate I earn from qualifying purchases.

In a Playwright Test configuration, spread the device descriptor first, then specify any intentional overrides afterward. This lets your explicit viewport replace the preset viewport. Choose one CSS-pixel width and height and keep them fixed across runs you plan to compare.

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: 'mobile-chrome',
      use: {
        ...devices['iPhone 13'],
        viewport: { width: 390, height: 844 },
      },
    },
  ],
});

The example uses the profile’s other settings but explicitly pins the viewport to 390 by 844 CSS pixels. If those dimensions are not the target you need, replace them with dimensions appropriate to your test and keep them unchanged for its baseline and later comparisons. Playwright’s available descriptors and context options are documented at Emulation and Configuration (use).

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

Use mobile and touch emulation deliberately

isMobile and hasTouch are related but distinct. Playwright describes isMobile as whether the meta viewport tag is taken into account and touch events are enabled; hasTouch specifies whether the viewport supports touch events. Prefer the selected device profile’s values when they represent your target rather than toggling these flags casually. The Android API documentation notes that isMobile is not supported in Firefox. These settings emulate browser context; they are not proof of behavior on every real handset. Details are in the emulation documentation.

Choose screenshot scale and page extent

Playwright’s screenshot API offers two useful scale choices. With css, the image has one pixel for each CSS pixel. With device, it has one pixel for each device pixel, so a high-DPI profile can produce a larger image. Pick the scale according to what the artifact is for, and keep it constant when comparing screenshots.

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.
  • Viewport capture: captures the currently visible area, useful when the comparison concerns the initial screen or a specific scrolled state.
  • Full-page capture: captures the scrollable page, useful when the whole document is the deliverable. It can produce a substantially taller image than a viewport capture.
import { test, expect } from '@playwright/test';

test('mobile page screenshot', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page).toHaveScreenshot('mobile-page.png', {
    fullPage: true,
    scale: 'css',
  });
});

Use fullPage: false or omit it when the intended output is only the viewport. The Page API documents screenshot options, including scale, at Page.

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

Make page-dependent context explicit

A page can render differently based on language, timezone, color scheme, geolocation, or permissions. If the site uses any of these to select content or appearance, set the relevant context option in the test configuration and keep it stable between baseline creation and comparison. These browser-context settings do not change the test runner’s own timezone. Playwright documents the available options in Configuration (use) and Emulation.

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.

Keep visual comparisons in the same environment

Matching the device profile and viewport is not enough if the machine that renders the page changes. Playwright warns that rendering can vary with host operating system, browser version, settings, hardware, power source, and headless mode. Its guidance is: “For consistent screenshots, run tests in the same environment where the baseline screenshots were generated.” Keep the browser and host setup stable for baseline generation and subsequent runs. See Playwright’s visual comparisons guide.

Use emulation for coverage, not as a physical-device guarantee

Configured mobile emulation is practical for repeatable automated checks, but it does not establish universal pixel accuracy across physical phones. Playwright’s Android automation is documented as experimental and has its own requirements and limitations. If the question is whether a behavior depends on a particular handset, operating-system build, or hardware capability, validate on the actual device conditions relevant to your users rather than treating an emulated profile as conclusive. See Playwright’s Android 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common screenshot differences and fixes

  • Layout shifts between runs: check that the same device descriptor and explicit viewport are used, and that the override follows the descriptor spread in configuration.
  • Text, images, or appearance differ: check whether locale, timezone, color scheme, geolocation, or permissions affect the page, then configure the relevant context consistently.
  • Image dimensions are unexpectedly large: verify whether scale: 'device' is producing device-pixel output; use css for one image pixel per CSS pixel.
  • The screenshot cuts off content: decide whether the target is the visible viewport or the full scrollable page, and set fullPage accordingly.
  • Baselines differ on another machine or after an environment change: run comparisons in the baseline’s host and browser environment; operating system, browser version, hardware, settings, power source, and headless mode can affect rendering.
  • A Firefox test does not behave as expected with isMobile: Playwright documents that option as unsupported in Firefox’s Android API context; do not assume that flag works across browser engines.

Or skip the browser setup

For a one-request screenshot instead of configuring a Playwright context, ScreenshotNeo accepts a URL and returns an image or PDF. Its clean-shot options accept cookie and consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response reports the page verdict and billing status in headers. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo.

Frequently Asked Questions

Does a Playwright device preset set only the viewport?

No. A preset can also include user-agent, screen-size, and touch-related settings.

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

Does mobile emulation guarantee the same screenshot as a physical phone?

No. It is a configured browser simulation, not a guarantee of pixel-identical output across real devices.

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.

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

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
Crashes, No Sound, or Screen Glitches?Free driver 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.