Set the application viewport with cy.viewport(), check the responsive behavior you expect, then save the visible screen with cy.screenshot() using capture: 'viewport'. This gives you repeatable screenshots at chosen widths and heights; it does not emulate every property of a physical phone or compare images for visual changes.
Set up repeatable mobile viewport tests
Use explicit dimensions that cover your breakpoints and the layouts your users need. The values below are examples, not a claim about the most common phone sizes; adapt them to your site. Cypress documents numeric width and height arguments for cy.viewport() and demonstrates testing multiple sizes with responsive UI assertions.
As an Amazon Associate I earn from qualifying purchases.
const mobileViewports = [
{ name: 'narrow mobile', width: 320, height: 640 },
{ name: 'typical mobile', width: 375, height: 812 },
{ name: 'wide mobile', width: 414, height: 896 },
]
describe('responsive navigation', () => {
mobileViewports.forEach(({ name, width, height }) => {
it(`works at ${name}`, () => {
cy.viewport(width, height)
cy.visit('/')
cy.get('[data-testid="mobile-menu-button"]').should('be.visible')
cy.get('[data-testid="desktop-navigation"]').should('not.be.visible')
cy.screenshot(`navigation-${width}x${height}`, {
capture: 'viewport',
})
})
})
})
Replace / and the test IDs with routes and selectors in your application. Put assertions before the screenshot so the captured file corresponds to a checked state. The example uses a named screenshot per viewport, which makes artifacts easier to identify.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Choose dimensions that test your breakpoints
Include sizes just below and above important CSS breakpoints, as well as representative dimensions for the layouts you support. Cypress also accepts a supported device preset and portrait or landscape orientation; explicit dimensions are often clearer when the purpose is to test a particular breakpoint. Consult the Cypress viewport command documentation for supported presets and current API behavior.
#1 Best Overall
- Universal unlocked. Compatible with all major U.S. carriers, including Verizon, AT&T, T-Mobile and other prepaid carriers.
- Super-bright, super-smooth 6.7" display. See your screen clearly even outdoors in sunlight, and enjoy seamless views with a fast-refreshing 120Hz display.*
- AI-powered camera system. Take stunning photos in any light with the 50MP camera**, look your best with a 32MP selfie cam*****, and capture extreme close-ups.
- Superfast 5G performance. Unleash your entertainment at 5G speed*** with the MediaTek Dimensity 6300 chipset and up to 12GB of RAM with RAM Boost****.
- Long-lasting battery + TurboPower charging. Power through day after day with a 5200mAh battery, then get hours of power in just minutes.****
cy.viewport() sets the application viewport, not a complete physical-device simulation: Cypress does not simulate devicePixelRatio. A passing test therefore shows how the page responds to the configured viewport dimensions, not how every device-specific feature behaves.
Set a default size when it belongs to the suite
Cypress documents a default viewport of 1000 by 660 pixels. To use a consistent size by default, configure viewportWidth and viewportHeight in Cypress configuration, or in a suite or test-specific configuration. Use cy.viewport() when a test needs to change size as it runs. A viewport set by that command resets to the configured default between tests. Since Cypress 16.0.0, Cypress.config() cannot be used to set viewportWidth or viewportHeight during test execution. See the Cypress configuration reference.
Rank #2
- 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.
Choose the screenshot capture mode
For a mobile screenshot that represents the screen a user can currently see, specify capture: 'viewport'. Cypress documents three capture modes:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches| Mode | What it captures | Use it for |
|---|---|---|
viewport |
The currently visible application viewport. | Reviewing a mobile layout as it appears at the chosen dimensions. |
fullPage |
The page from top to bottom, captured by scrolling and stitching screenshots. | Inspecting page-length content. Fixed or sticky elements may appear more than once in the stitched image, so this is not the same artifact as a user’s viewport. |
runner |
The Cypress browser context, including the runner. | Debugging when the surrounding Cypress context is useful. |
The default capture mode is fullPage. Automatic screenshots on test failure are coerced to runner captures, so they are not equivalent to an application-only viewport screenshot. The screenshot command and options are documented in Cypress’s screenshot command reference.
Rank #3
- Charger NOT Included, 6.7" Super AMOLED FHD+, 90Hz Refresh Rate, 385 ppi, 800 nits (HBM), 1080x2340px, 5000mAh Battery
- 128GB, 4GB RAM, microSDXC, Exynos 1330 (5nm), Octa-Core, Mali-G68 MP2 or Mali-G57 MC2 GPU
- Rear Camera: 50MP, f/1.8 (wide) + 5MP, f/2.2 (ultrawide) + 2MP, f/2.4 (macro), LED flash, panorama, HDR; Front Camera: 13MP, f/2.0, Android 14, up to 6 major Android upgrades, One UI 6.1
- 3G: HSDPA 850/900/1700(AWS)/1900/2100; 4G LTE: 1/2/3/4/5/7/12/13/14/20/25/26/28/29/30/38/39/40/41/48/66/71, 5G: 2/5/25/41/66/71/77/78 SA/NSA/Sub6/mmWave - Nano-SIM + eSIM
- US Model – Global Connectivity – Compatible with Most GSM Carriers like T-Mobile, AT&T, MetroPCS, etc. Will Also work with CDMA Carriers Such as Verizon, Straight Talk.
Keep screenshots stable enough to inspect
- Use the same explicit viewport dimensions each time you capture a given case.
- Wait for the intended page state and assert it before taking the screenshot. If content loads asynchronously, wait for an observable condition rather than relying on an arbitrary delay alone.
- Cypress’s screenshot API disables JavaScript timers and CSS animations by default during capture. The screenshot API also provides callbacks for synchronous adjustments before or after capture when a test needs them; check the current API documentation for the callback options.
- For image comparisons across runs, keep the operating system, browser version, display scaling, and installed fonts consistent. Environment differences can create image diffs even when the application has not meaningfully changed, as Cypress explains in its visual testing guide.
Screenshots are written to cypress/screenshots by default; Cypress configuration can change the screenshot folder. Cypress automatically captures screenshots on failure during cypress run, but not during cypress open. See the configuration reference and screenshot command reference.
Do not confuse browser display size with the app viewport
cy.viewport() sets the application’s viewport dimensions. The before:browser:launch API can configure a headless browser’s display size, which can affect screenshots and videos separately. Changing the browser window or display size is not a substitute for setting a mobile application viewport. Cypress describes this distinction in its browser launch API documentation.
Rank #4
- 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.
When you need visual comparison, add a comparison workflow
cy.screenshot() saves an image; it does not compare that image with a baseline. Cypress states in its visual testing guide that the built-in command captures images but does not compare them.
PC 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 & 11Crashes, 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 minuteCypress’s guide describes optional integrations for visual review, including Applitools Eyes (AI-assisted comparison), Argos (CI and pull-request review), Chromatic (cloud rendering and diffs), Happo (screenshots across browsers and screen sizes), LambdaTest SmartUI (cross-browser and resolution comparisons), and Percy (cloud rendering across browsers and responsive widths). These services differ in rendering coverage, comparison approach, pull-request workflow, and fit with a team’s Cypress and CI setup. Their current features, prices, and availability should be checked with the providers; Cypress’s guide is not a current pricing comparison.
Best Value
- 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.
Troubleshooting mobile screenshots
The screenshot shows a desktop layout
Confirm that the test calls cy.viewport(width, height) before checking the page, and that the test is exercising the expected route and breakpoint. Changing the headless browser’s display size with a launch event does not set the app viewport.
The screenshot is taller than the visible screen
Set capture: 'viewport' explicitly. Cypress’s default is fullPage, which scrolls and stitches the page. Expect fixed or sticky elements to repeat in a full-page image.
Images differ across machines or runs
First make the viewport and rendering environment consistent: use the same browser version, operating system, display scaling, and fonts. Then make sure the page is in the same state before capture and account for animation or time-dependent content. Differences in those conditions can produce visual diffs without a meaningful application change.
Free tools Windows power users keep installed
One-click scans. No signup required.
No automatic failure screenshot appears in the interactive runner
Automatic failure screenshots are captured during cypress run, not cypress open. Use an explicit cy.screenshot() call when you need a screenshot during an interactive test session.
The test expects a phone-specific rendering feature
Remember that setting viewport dimensions is responsive viewport testing, not complete hardware emulation. In particular, Cypress does not simulate devicePixelRatio; validate device-specific behavior with an appropriate device-testing approach as well.
Or skip the browser setup
If you need a screenshot API rather than a Cypress test artifact, ScreenshotNeo takes a screenshot from one GET request. For example, with cURL:
Quick Recap
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. It accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses indicate the page verdict and billing status with X-Page-Verdict and X-Billed headers. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf 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. Sign up for 1,000 free screenshots a month, with no card required.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.




