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 DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Seoul desk5 min

How to Emulate a Samsung Phone Viewport in Playwright

Learn how to use Playwright’s built-in Galaxy profiles, configure a custom Samsung-like viewport, and decide when real Samsung Internet testing is needed.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright’s built-in device descriptor for the Samsung model you want to approximate, such as devices['Galaxy S24']. It sets a coordinated group of browser-emulation options—including viewport, screen, device scale factor, mobile behavior, touch, and user agent—rather than just changing the viewport dimensions. These profiles simulate selected browser properties; they do not replace testing on Samsung hardware or in Samsung Internet.

Use a built-in Samsung device profile

With Playwright Test, spread the descriptor into the test’s context options:

As an Amazon Associate I earn from qualifying purchases.

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

test.use({ ...devices['Galaxy S24'] });

test('mobile layout', async ({ page }) => {
  await page.goto('https://example.com');
  // Add assertions for the behavior you want to verify.
});

The same descriptor works when creating a context directly with Playwright:

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

const browser = await chromium.launch();
const context = await browser.newContext({ ...devices['Galaxy S24'] });
const page = await context.newPage();

try {
  await page.goto('https://example.com');
  // Add assertions or interactions here.
} finally {
  await browser.close();
}

Install the package used by your project—@playwright/test for the test-runner example or playwright for the direct API example—and install the required browser binaries for that Playwright setup. The examples use Chromium because the Samsung descriptors in the registry default to Chromium. Check the device registry for the Playwright version installed in your project: descriptor names and values can change between releases. See the Playwright emulation guide and device descriptor source.

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

Choose the Samsung viewport that matches the test

These are the current descriptor values in the Playwright registry reviewed for this guide. They are emulation settings, not universal measurements of every phone or its current browser configuration.

Playwright descriptor Viewport (CSS pixels) Device scale factor Profile details
Galaxy S24 360 × 780 3 Mobile and touch enabled; Chromium default
Galaxy A55 480 × 1040 2.25 Mobile and touch enabled; Chromium default
Galaxy Z Fold 7 (inner screen) 984 × 1016 2 Fold-open profile
Galaxy Z Fold 7 (cover screen) 360 × 764 3 Separate cover-screen profile

Use the S24 or A55 descriptor when its dimensions and profile fit the layout question. For a Fold, choose the inner or cover profile deliberately: the two screens have substantially different viewports. The viewport dimensions are the values CSS responsive breakpoints see; the device scale factor controls the relationship between CSS pixels and device pixels. Mobile and touch settings also influence behavior, so changing dimensions alone is not equivalent to using the full descriptor.

Rank #2
Samsung Galaxy A16 4G LTE (128GB + 4GB) International Model SM-A165F/DS Factory Unlocked, 6.7", Dual SIM, 50MP Triple Camera (Case Bundle), Black
  • Please note, this device does not support E-SIM; This 4G model is compatible with all GSM networks worldwide outside of the U.S. In the US, ONLY compatible with T-Mobile and their MVNO's (Metro and Standup). It will NOT work with other CDMA carriers, and it is also not compatible with their MVNO (Visible, Xfinity Mobile, US Mobile, Cricket Wireless, etc).
  • Compatibility with certain third-party devices and accessibility accessories, including some hearing aids, may vary depending on manufacturer support, Bluetooth protocols, software compatibility, and regional firmware limitations. For additional hearing aid compatibility information, please refer to Samsung’s official support documentation.
  • Camera: 50 MP, f/1.8, (wide), 1/2.76", 0.64µm, AF | 50 MP, f/1.8, (wide), 1/2.76", 0.64µm, AF | 2 MP, f/2.4, (macro). Battery: 5000 mAh, non-removable | A power adapter is NOT included.

Customize the emulation when no profile fits

If your test needs a non-registry size, configure the relevant properties on a context. This example uses a 360 × 780 viewport and screen, scale factor 3, and enabled mobile and touch behavior:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const context = await browser.newContext({
  viewport: { width: 360, height: 780 },
  screen: { width: 360, height: 780 },
  deviceScaleFactor: 3,
  isMobile: true,
  hasTouch: true,
  userAgent: 'your chosen user agent',
});

Replace the example user-agent string with one appropriate to the test, or omit that override if it is unnecessary. A manually assembled context can combine properties that do not describe a real Samsung configuration. Prefer a built-in descriptor when it matches your target; consult the current Browser.newContext API documentation for valid options in your installed Playwright version.

Rank #3
Sale
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.

Know what Playwright’s Samsung profile can verify

Device emulation is useful for responsive layout checks, mobile user-agent handling, and touch-oriented interactions. It does not make desktop Chromium a Samsung phone, nor does the descriptor establish that a site behaves identically on Samsung hardware or in Samsung Internet.

If the issue is specifically about Samsung Internet, its rendering, hardware, sensors, keyboard behavior, browser chrome, or a particular OS and browser build, test on a real device or an Android environment running the target browser. Samsung documents that Samsung device browser user agents use the SamsungBrowser/version token. For Samsung Internet v24.0 or later, its documentation also describes a unified platform token as part of user-agent reduction. See Samsung’s user-agent string format documentation.

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

Troubleshooting common problems

  • “Cannot read properties of undefined” or an unknown descriptor: Confirm the descriptor key’s spelling and capitalization against the device registry for the Playwright version installed. A descriptor available on the live registry may not exist in an older installed package.
  • The page has the right width but does not behave like a mobile page: A viewport-only override does not set all mobile-profile properties. Use the named descriptor, or set the needed screen, scale factor, isMobile, and hasTouch options explicitly.
  • Touch interactions do not work as expected: Check that the context enables touch, and verify that the test uses touch-compatible actions and assertions. A narrow viewport alone does not enable touch behavior.
  • Images or screenshots look unexpectedly large or dense: Check deviceScaleFactor as well as the CSS viewport. The scale factor affects the mapping from CSS pixels to device pixels.
  • Fold layout is wrong: Make sure the test uses the intended inner-screen or cover-screen profile. Do not treat the Fold as one fixed viewport.
  • The bug persists only in Samsung Internet or on a phone: A Chromium descriptor does not reproduce that browser or physical hardware. Reproduce the issue using the target browser and device environment.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a screenshot rather than an interactive Playwright test, ScreenshotNeo is a website screenshot API and MCP server. It does not replace Playwright’s Samsung device emulation. A single request captures a URL as an image or PDF; it does not create a Samsung hardware or Samsung Internet test.

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

For example, request a screenshot from the command line:

Best Value
Sale
Samsung Galaxy S26, Unlocked Android Smartphone, 256GB, Black | Powerful Processor, Galaxy AI, Immersive Viewing, Durable Battery, 2026, US 1 Year Warranty
  • 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
  • MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile whether it’s a special contact photo, custom wallpaper, an invitation or more³
  • FAST. POWERFUL. AI-READY: Power through your day with AI-accelerated performance from our fastest, smoothest and most powerful Galaxy processor yet, built to keep up with everything you do
  • IMMENSELY IMMERSIVE: No matter where you are or what you’re watching, your favorite videos and more come to life with the vibrant display on Galaxy S26
  • FIT EVERYONE IN THE SHOT: Group selfies are easier on your Samsung phone with a wider front camera⁴ that captures more of the scene, so no one gets left out of the moment
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for the request options and response details. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Sign up for free.

Frequently Asked Questions

Can I use a Samsung profile with Firefox or WebKit in Playwright?

The Samsung descriptors covered here default to Chromium. Check the descriptor’s browser setting and the current Playwright documentation before using a profile with another engine.

Does a Galaxy S24 Playwright profile prove my site works on a Galaxy S24?

No. It emulates selected browser properties. Use a physical device or an Android environment with the target browser for device- or browser-specific verification.

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

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