October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Capture Mobile Website Screenshots with Playwright in Landscape Mode

Use a landscape device profile or custom viewport in Playwright, then choose viewport, full-page, or clipped capture and the output scale you need.

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.

Set a Playwright browser context to a landscape mobile device profile, open the page, and call page.screenshot(). Use a built-in landscape preset for a familiar device configuration, or specify your own landscape viewport when the target is a particular breakpoint. Playwright emulates a device in a browser; this workflow does not take a screenshot on a physical phone.

Capture a page with a landscape mobile preset

This JavaScript example uses the documented iPhone 13 Mini landscape profile and saves the visible viewport to a PNG. Install Playwright and its browser binaries for your project before running it.

As an Amazon Associate I earn from qualifying purchases.

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

const browser = await chromium.launch();
const context = await browser.newContext({
  ...devices['iPhone 13 Mini landscape'],
});
const page = await context.newPage();

try {
  await page.goto('https://example.com', { waitUntil: 'load' });
  await page.screenshot({ path: 'mobile-landscape.png' });
} finally {
  await browser.close();
}

The preset applies a device profile, including viewport and mobile-related settings. Device descriptors also record a defaultBrowserType; if the browser engine matters to your test, use the engine specified by that profile rather than assuming every preset is intended for every engine. See Microsoft’s Playwright emulation guide and the official device descriptor source.

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.

Use a custom landscape viewport

Choose custom dimensions when you need to exercise a specific responsive breakpoint rather than mimic a named device. Make the viewport width greater than its height, and set mobile, touch, and device-scale behavior to match the scenario you want to test.

#1 Best Overall
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • 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 { chromium } from '@playwright/test';

const browser = await chromium.launch();
const context = await browser.newContext({
  viewport: { width: 844, height: 390 },
  screen: { width: 844, height: 390 },
  isMobile: true,
  hasTouch: true,
  deviceScaleFactor: 2,
});
const page = await context.newPage();

try {
  await page.goto('https://example.com', { waitUntil: 'load' });
  await page.screenshot({ path: 'custom-mobile-landscape.png' });
} finally {
  await browser.close();
}

The sample dimensions are an example, not a required device size. Change them to the landscape viewport you need to validate. Playwright allows device parameters to be configured through the browser context and permits viewport overrides; its emulation is a browser-testing technique, not proof of behavior on physical hardware. Consult the emulation guide for the parameters supported by your Playwright version.

Choose the capture area and image scale

A screenshot without extra options captures the visible viewport. Use fullPage: true to include the full scrollable page, or clip to capture a rectangle. The scale option controls output pixel dimensions: 'css' produces one image pixel per CSS pixel, while 'device' produces one image pixel per device pixel.

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.
// Full scrollable page
await page.screenshot({ path: 'full-page.png', fullPage: true, scale: 'css' });

// A rectangular region, in page CSS pixels
await page.screenshot({
  path: 'hero-region.png',
  clip: { x: 0, y: 0, width: 844, height: 300 },
  scale: 'device',
});
  • Use the default viewport capture for a screen-level landscape view.
  • Use fullPage when below-the-fold content is part of the check.
  • Use clip when only a region matters.
  • Prefer CSS scale for compact captures whose dimensions are comparable in CSS pixels. Device scale can preserve higher pixel density, but may make the output larger.

These capture modes and scale behavior are documented in the Playwright Page screenshot API.

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

For a one-call screenshot API instead of managing a Playwright browser context, ScreenshotNeo accepts a URL and returns an image or PDF. The example requests a WebP screenshot of a page; the API supports custom viewport and device presets, including landscape-sized captures.

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
Rank #4
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black | Privacy Display, Galaxy AI, AI Camera, Super Fast Charging 3.0, Durable Battery, 2026, US 1 Year Warranty
  • 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
Rank #3
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • 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.
curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://example.com 
  -o mobile-landscape.webp

See the ScreenshotNeo API documentation for request options. Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides screenshot tools for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Learn more at ScreenshotNeo, or sign up for 1,000 free screenshots a month with no card.

Troubleshooting landscape captures

  • The layout still looks like desktop. A wide viewport alone does not reproduce all mobile settings. Use a mobile device descriptor or configure the relevant mobile, touch, and device-scale context parameters as well as landscape dimensions.
  • The page is not fully loaded in the image. Navigation’s load event does not guarantee that every asynchronous widget or image is ready. Wait for a relevant selector or other page-specific readiness condition before taking the screenshot.
  • The output is taller or larger than expected. Check whether you enabled fullPage and whether scale: 'device' is producing device pixels. Use the viewport default and CSS scale for a more compact screen capture.
  • The screenshot does not match a real phone. Playwright emulates browser settings. Compare against actual hardware when physical-device behavior is a requirement.
  • A device preset does not work with the chosen engine. Check that profile’s defaultBrowserType in the official descriptor source and launch the corresponding Playwright browser type.

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