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 DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

How to Take a Mobile Webpage Screenshot with Selenium Chrome Emulation

Configure Chrome mobile emulation before creating a Selenium session, wait for the content you need, and save the current window as a PNG.

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.

To screenshot a mobile webpage with Selenium, enable Chrome’s mobile-emulation capability before starting the browser, open the page, wait for the content you need, and save the current window as a PNG. You can use a named device profile or set custom viewport dimensions and a pixel ratio; simply resizing a desktop browser window is not equivalent to mobile emulation.

Configure Chrome for mobile emulation

Set emulation as a Chrome option before creating the WebDriver session. Selenium’s Chromium options support either a named device profile or custom device metrics. Metrics include width, height and pixel ratio; the example below uses illustrative values, not a specification for a particular phone. See Selenium’s Chrome options documentation for the capability shape and check that a named profile is supported by the Chrome version in your environment.

As an Amazon Associate I earn from qualifying purchases.

Use custom viewport metrics

This Python example uses Selenium’s Chrome Options API and the mobileEmulation experimental option:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait

options = Options()
options.add_experimental_option("mobileEmulation", {
    "deviceMetrics": {
        "width": 360,
        "height": 640,
        "pixelRatio": 3.0,
    }
})

driver = webdriver.Chrome(options=options)
try:
    driver.get("https://example.com")

    # Wait for a meaningful element that should appear in the screenshot.
    WebDriverWait(driver, 15).until(
        lambda browser: browser.find_element("css selector", "main").is_displayed()
    )

    driver.save_screenshot("mobile-page.png")
finally:
    driver.quit()

Install Selenium and ensure a compatible Chrome browser and ChromeDriver are available in your environment. The current Selenium Python screenshot API saves the current window to a PNG file with save_screenshot(filename); it also offers get_screenshot_as_file(filename) to save to a file and get_screenshot_as_png() to return PNG bytes. See the Selenium Python WebDriver API.

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

The selector in the example is only suitable if the target page has a visible <main> element. Replace it with a selector for the content your capture actually depends on. If there is no reliable element, wait for a page-specific condition instead of adding an arbitrary short sleep. A missing selector or a page that never makes the element visible causes the wait to time out.

Use a named device profile

When you want one of Chrome’s available emulated profiles, configure the profile name rather than supplying metrics. Confirm that the name is supported by the Chrome version installed where the test runs; profile availability can vary with the browser version.

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.
options = Options()
options.add_experimental_option("mobileEmulation", {
    "deviceName": "Google Pixel 2"
})

Use custom metrics when you need a known viewport or a project-specific test size. A named profile is more convenient when the profile identity matters. Selenium documents both configuration patterns but does not claim that one is inherently more accurate.

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

What the screenshot captures—and what emulation means

save_screenshot captures the current browser window. Do not describe this output as a full-page screenshot: the Python API documents a current-window capture, not a full-page capture technique. If you need the entire page, you will need a separately verified full-page method.

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.

Mobile emulation is more than changing window dimensions. Chrome’s device-metrics overrides affect screen dimensions and CSS device-related media-query results. Mobile mode also enables mobile-oriented behavior such as viewport-meta handling, overlay scrollbars and text autosizing. Those browser overrides make the session useful for responsive-page checks, but they do not prove that the page behaves exactly like it would on a physical phone. Rendering, operating-system behavior, hardware and network conditions may differ; validate on an actual device when those differences matter.

Troubleshoot common capture problems

  • The page looks like a desktop layout: confirm that mobileEmulation was added to Chrome options before webdriver.Chrome() created the session. Resizing the window alone does not enable all mobile-emulation behavior.
  • Chrome rejects a named device: verify the profile name against the installed Chrome version, or switch to custom deviceMetrics.
  • The capture is blank or missing the expected content: wait for an element or state that signals the needed content is ready. Navigation completing does not necessarily mean that delayed page content has appeared.
  • The explicit wait times out: check that the selector exists on this page, that it is visible at the emulated viewport, and that the page loaded successfully. Adjust the condition to match the content the screenshot needs.
  • The output is not a full-page image: this is expected for the documented current-window screenshot methods. Use a separately verified full-page approach if that is the requirement.
  • The screenshot differs from a real phone: emulation is a browser-level approximation. Use physical-device validation when exact device behavior is important.

Or skip the browser setup

If you need a screenshot endpoint instead of managing a Selenium browser session, ScreenshotNeo accepts one GET request with a URL and returns an image or PDF. Its clean-shot options accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups and chat widgets before capture; you can turn each step off. Bot checks, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server gives AI agents tools for screenshots, page information and PDF capture.

For example, save a mobile-sized capture as WebP with custom viewport parameters:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 --data-urlencode width=360 --data-urlencode height=640 --data-urlencode device_scale_factor=3 --data-urlencode format=webp -o mobile-page.webp

See the ScreenshotNeo API documentation for parameters and response details. Its free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for 1,000 free screenshots a month, with no card required.

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

Frequently Asked Questions

Does Selenium’s Python screenshot method create a full-page screenshot?

No. The documented methods capture the current browser window; a separate, verified full-page technique is needed for a full-page image.

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

Should I use a named profile or custom metrics?

Choose a named profile when the emulated profile identity matters and is available in your Chrome version. Choose custom metrics when you need specific viewport dimensions and pixel ratio.

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.

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.

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.