Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Use a Playwright device preset when you need a coherent mobile-browser profile, or set the CSS viewport directly when your test is specifically about a responsive breakpoint. For repeatable visual tests, run those configurations as Playwright Test projects and create and compare screenshot baselines in the same environment.
How do I take screenshots at mobile viewport sizes in Playwright?
For a quick viewport-only check, set the viewport on a page and capture it. This controls the CSS layout dimensions; it does not by itself reproduce every mobile-browser property such as touch behavior or a mobile user agent.
import { test, expect } from '@playwright/test';
test('mobile layout screenshot', async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await page.goto('https://example.com');
await expect(page).toHaveScreenshot('mobile-layout.png');
});
Choose width and height to match the layout case you intend to test. If the responsive behavior depends on the CSS viewport, width is usually the key dimension; device pixel density is a separate setting. A viewport override is therefore useful for breakpoint coverage, while a device preset is better when the test also needs a coordinated mobile profile.
How do I emulate an iPhone or Android phone in Playwright?
Playwright exposes device descriptors through devices. A descriptor can include viewport and screen dimensions, user agent, touch capability, and mobile behavior. These presets are starting configurations, not a guarantee that a physical phone will render identically. Device labels in the registry can change, so check the catalog in the Playwright version installed in your project.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute#1 Best Overall
- 【Strong Adsorption】The inspiration of the silicone phone suction case comes from the adhesive force of the octopus. Each suction cup phone mount is 3.15 inches long and 2.17 inches wide, with 24 independent suction cups providing a stronger and more stable suction force, so you don't have to worry about your phone falling during use.
- 【Back of Phone Suction Grip】Remove the adhesive film on the phone suction cup and stick it on the phone case. You can then fix the phone on any smooth surface, which is very convenient. (The phone suction cup cannot be removed and reused after being attached to the phone case. It is recommended to attach it to a regular phone case, not a valuable one.)
- 【Widely Used】Our non-slip silicone phone sticky grip mount attaches to almost any flat phone case and make it compatible with common mobile phones such as iPhone and Android.You can shoot, watch videos or video calls in the kitchen, gym, dance studio, bathroom and other places.
- 【Capture the Wonderful Picture】Whether you are a TikTok creator or just like to share videos and photos, this phone suction cup can help you hands-free capture wonderful videos and photos for sharing with friends.
- 【Note】You can fix the phone suction cup on a smooth surface such as a mirror or glass. If necessary, wipe the suction cup with a damp cloth to obtain stronger suction. Before releasing your hand, make sure the phone is firmly fixed. (Not applicable to rough walls, wooden surfaces, and other uneven surfaces)
import { chromium, devices } from '@playwright/test';
const browser = await chromium.launch();
const context = await browser.newContext({
...devices['iPhone 12'],
viewport: { width: 390, height: 844 }, // override preset if needed
});
const page = await context.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'iphone-emulation.png', fullPage: true });
await browser.close();
Put an override after spreading the preset so it takes precedence. A context can also be configured with a preset and later adjusted with page.setViewportSize(). For high-density output, set deviceScaleFactor deliberately and keep it consistent between baseline generation and comparison.
The isMobile setting controls whether the page’s meta viewport tag is taken into account and enables touch events. Presets may already supply mobile-specific values; avoid adding conflicting options without a test-specific reason. Playwright can also emulate locale, timezone, geolocation, permissions, and color scheme. Set only the environmental conditions relevant to the behavior under test. See Playwright’s emulation guide.
How should I organize desktop and mobile screenshot projects?
Playwright Test projects let the same tests run under separate browser and device configurations. This example defines desktop Chromium and two mobile-emulation projects:
Rank #2
- SUPERIOR COMFORT — Unlike traditional circular ear buds, the design of EarPods is defined by the geometry of the ear. Which makes them more comfortable for more people than any other ear bud–style headphones.
- HIGH-QUALITY AUDIO — The speakers inside EarPods have been engineered to maximize sound output and minimize sound loss, which means you get high-quality audio.
- BUILT-IN REMOTE — EarPods with USB-C plug also include a built-in remote that lets you adjust the volume, control the playback of music and video, and answer or end calls with a pinch of the cord.
- COMPATIBILITY — Works with all devices that have a USB-C port.
- INTEGRATED MICROPHONE — A built-in microphone precisely captures your voice while you’re on the phone, taking a FaceTime call, or summoning Siri — so you’re always heard loud and clear.
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{
name: 'desktop-chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'mobile-chrome',
use: { ...devices['Pixel 5'] },
},
{
name: 'mobile-safari',
use: { ...devices['iPhone 12'] },
},
],
});
The profile names above follow Playwright documentation examples; use names present in your installed registry and choose cases based on your supported audience and browser risks. Projects can also cover Firefox, WebKit, or branded Chrome and Edge channels when those are relevant. Browser availability and channel configuration are described in the Playwright browser guide.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →With no project filter, the test suite runs its configured projects. To run just one, use:
npx playwright test --project=mobile-chrome
Prefer a small, intentional matrix over every possible combination. Select representative CSS breakpoints, mobile behavior, pixel density where relevant, and browser engines your product supports. There is no universal best phone or required viewport list.
Rank #3
- Secure Hold: Our PopSockets adhesive phone grip gives your cell phone a secure, comfortable hold in hand to help prevent drops while texting, taking photos, or scrolling on the go. Designed to stick firmly to most phone cases and devices.
- Hands-Free Made Easy: Easily turn your PopSocket into a phone stand to prop up your phone anywhere, perfect for watching videos, video calls, or following recipes. A must-have phone holder that keeps your device secure and ready for anything.
- Compatibility: Works with all phones, tablets, and Kindles. Sticks best to smooth, hard plastic cases and may not adhere to silicone or textured cases. Easily swap your PopTop to change up your style.
- Black PopSockets: Simple, refined, and endlessly versatile. A timeless essential for any phone.
- Travel Must-Have for People On the Go: A must-have travel accessory for flights, flying, airports, air travel, airplanes, planes, international trips, cruises, and long travel days. Key gadget for your airport haul, travel accessories and must-haves.
How do screenshot baselines work?
expect(page).toHaveScreenshot() creates a reference image on its first run; later runs compare the current capture with that reference. Treat the first run as baseline creation: inspect the generated files and commit intentional expected snapshots through your normal source-control workflow.
Playwright retries capture until two consecutive screenshots match, then stores the last capture. When an intentional product change requires new references, run:
Free tools Windows power users keep installed
One-click scans. No signup required.
npx playwright test --update-snapshots
Review the resulting image diffs before accepting them. Do not update snapshots reflexively just to make a failure disappear: determine whether the UI changed intentionally, the test is unstable, or the environment has drifted. The visual comparisons guide documents comparison options including maxDiffPixels and stylePath, which can apply a stylesheet to hide known volatile elements. Keep such controls narrowly scoped so they do not conceal real layout defects.
Rank #4
- [360 ° Flexible Rotation Design] Comes with a rotatable lanyard ring that supports 360 ° free rotation, effectively solving the problem of twisted and tangled lanyards
- [Wide compatibility] The ultra-thin 0.02-inch design does not block the charging port at all, and both wired and wireless charging can be used directly without removing the pad. Compatible with most smartphones such as iPhone, compatible with various wristbands, lanyards, crossbody straps, and keychains
- [Durable and Portable Material] Premium rust-resistant stainless steel material with good flexibility, which not only avoids scratching the phone case, but also has excellent anti rust and anti fading performance
- [Multi scenario Practical] Paired with a lanyard or wristband, hands-free use can be achieved. The phone is within reach and not easily dropped, ideal for daily commuting and outdoor activities. Suitable for full coverage phone cases, does not support half coverage phone cases
- [Quality Service] If you find any damage or other issues with the product upon receipt, please contact us immediately. We will handle it quickly
Why do Playwright screenshot tests fail on CI?
A screenshot can differ even when the application code has not changed. Playwright identifies host operating system, browser version, browser settings, hardware, power source, and headless mode as potential sources of rendering variation. Baselines generated on a developer laptop may therefore disagree with CI captures.
- Generate and compare baselines in a consistent environment, including the same OS and browser version where possible.
- Keep project settings such as viewport, device scale, color scheme, and headless mode stable.
- When a test is flaky, check whether the page has settled and whether volatile content should be controlled with a narrowly scoped stylesheet.
- Inspect the actual and expected images before updating snapshots; a changed baseline is not automatically a correct baseline.
For the specific retry and baseline workflow, see Playwright’s visual comparison documentation.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When does a real Android device add value?
Emulation covers many responsive-layout checks and mobile-browser settings, but it cannot establish that every physical device, operating-system interface, browser build, hardware characteristic, or native-app WebView behaves the same way. If those differences matter to your users or risk profile, add representative hardware validation.
Best Value
- 【PKYAA Double Sided Silicone Suction Phone Case Mount】PKYAA With Double Sided 40 Strong and Reliable individual suction cups, PKYAA provides a thicken and upgraded universal silicon suction mount for your phone.
- 【Friendly to Content Creators】If you are a content creator or an online influencer, you can create videos anywhere with this suction mount completely hands free with this silicone cell phone mount for cases.
- 【HANDS-FREE & Adhere to Mirrors】This Double Sided silicone suction phone case mount allows you to stick your phone to the mirror easily. No longer holding your phone in one hand to watch video tutorials while making up.
- 【Strong Grip on the Smooth Surface】You can easily hang your phone anywhere with a smooth surface. All you do is you clean off your phone and smooth surface. It is STURDY and it not only sticks to mirrors, it also sticks to windows, it sticks to refrigerators, tiles and other clean, flat surfaces.
- 【Press Down Firmly Every 30 Minutes】Use your palm or fingers to press the phone down firmly and check it's secure before letting go. Apply even pressure for a few seconds to allow the suction cup to adhere properly. To maintain the grip and prevent accidental falls, it's a good practice to periodically reapply pressure to the suction cup.
Playwright’s Android API supports automation involving connected Android devices, including Chrome and WebView workflows and screenshot capture. This is a separate, optional setup—not a prerequisite for ordinary mobile viewport emulation. Consult the Android API guide for requirements and limitations. You can run the emulated project workflow without buying a phone.
Or skip the browser setup
If you need a page image rather than a Playwright visual-regression test, ScreenshotNeo can return a screenshot or PDF from one GET request. For example, using cURL:
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 request options. It accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000. ScreenshotNeo is a screenshot API, not a replacement for Playwright’s test assertions and committed visual baselines.
Sign up free for 1,000 screenshots a month, with no card required.
Frequently Asked Questions
Does Playwright emulate iOS Safari on a physical iPhone?
No. A device preset configures browser-emulation properties; it is not a physical iPhone test.
Can I run only the mobile project?
Yes. Use the project’s configured name with `npx playwright test –project=
Should I commit Playwright screenshot baselines?
Commit reviewed, intentional reference snapshots using your team’s normal source-control process.
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.

