Free tools Windows power users keep installed
One-click scans. No signup required.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Viewport is the emulated page area that controls CSS layout, responsive breakpoints, and values such as window.innerWidth. Screen is the display geometry exposed to page JavaScript through window.screen. They describe different layers of the browser, so changing one does not generally change the other.
For most responsive tests, set a fixed viewport. Set screen as well only when the application reads screen metrics or the scenario models a display larger than the browser content area.
Viewport and screen: the practical difference
| Concern | viewport |
screen |
|---|---|---|
| Main purpose | Emulates the page content dimensions used for layout and rendering. | Emulates display geometry exposed through window.screen. |
| Typical page observations | window.innerWidth, window.innerHeight, CSS media queries and component layout. |
window.screen.width, window.screen.height and available-screen metrics. |
| Playwright configuration | browser.newContext({ viewport }) or page.setViewportSize(). |
browser.newContext({ screen }). |
| Can it be used alone? | Yes. | No. Playwright applies screen only when a viewport is set. |
| Determinism | Fixed values are repeatable across machines. | Fixed values are repeatable when configured at context creation. |
| Mutation caveat | page.setViewportSize() changes the viewport. |
That page-level call also resets the configured screen size. |
What Playwright means by viewport
A Playwright viewport is a width and height in CSS pixels for the page surface. It is the value that normally drives responsive behavior: breakpoint selection, line wrapping, grid columns, navigation collapse and element dimensions. A page with a 1365-pixel viewport should lay out as a 1365-pixel browser content area, regardless of a larger emulated monitor.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallThe documented default viewport is 1280×720. For reliable tests, specify the dimensions explicitly rather than relying on that default implicitly. Setting viewport: null opts out of the fixed emulation and makes the size depend on the host operating-system window. Playwright documents that mode as non-deterministic, which makes it a poor default for parallel or CI runs.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
What Playwright means by screen
The screen option supplies the display geometry that page code reads from window.screen. It can represent a physical display larger than the browser content area. For example, a test can model a 1920×1080 display with a browser viewport of 1365×768:
const context = await browser.newContext({
viewport: { width: 1365, height: 768 },
screen: { width: 1920, height: 1080 },
});
In that example, CSS layout follows 1365×768. Code inspecting window.screen.width sees 1920, and window.screen.height sees 1080. The screen setting does not enlarge the page or force media queries to use the monitor dimensions. Also, screen is only used when a viewport is set; a screen-only context does not provide the intended independent display model.
Which value drives responsive breakpoints?
Use the viewport. CSS media queries and the page’s layout calculations are based on the available browser content area, not the value returned by window.screen. A test such as this checks the behavior that users see:
import { test, expect } from '@playwright/test';
test('navigation collapses at the mobile breakpoint', async ({ browser }) => {
const context = await browser.newContext({
viewport: { width: 390, height: 844 },
});
const page = await context.newPage();
await page.goto('https://example.com');
await expect(page.locator('[data-testid="mobile-menu"]')).toBeVisible();
await context.close();
});
Do not replace the viewport assertion with window.screen.width. A large emulated screen can coexist with a narrow viewport, and the page should still render its narrow layout.
When should you configure both?
Ordinary responsive-layout tests
Set only a fixed viewport when the test covers CSS breakpoints, component arrangement, screenshots or visual regression:
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
const context = await browser.newContext({
viewport: { width: 1365, height: 768 },
});
This is the simplest and most portable configuration. Avoid viewport: null in CI unless the purpose of the test is specifically headed, host-window behavior.
Applications that read screen metrics
Set both values when application code branches on window.screen, calculates display availability, or when you need to model a browser window inside a larger monitor:
const context = await browser.newContext({
viewport: { width: 1365, height: 768 },
screen: { width: 1920, height: 1080 },
});
const page = await context.newPage();
await page.goto('https://example.com');
const geometry = await page.evaluate(() => ({
innerWidth: window.innerWidth,
innerHeight: window.innerHeight,
screenWidth: window.screen.width,
screenHeight: window.screen.height,
}));
console.log(geometry);
Expect the inner dimensions to reflect the viewport and the screen dimensions to reflect the screen setting. Browser chrome, operating-system taskbars and device-pixel scaling are separate concerns; do not infer them from these four values.
Device presets: a coordinated bundle
Playwright device descriptors can provide a viewport, user agent, touch capability and related device properties together. Use a preset when you are testing a known device profile, then override the viewport if the content area must differ:
import { chromium, devices } from 'playwright';
const browser = await chromium.launch();
const context = await browser.newContext({
...devices['Desktop Chrome'],
viewport: { width: 1440, height: 900 },
});
const page = await context.newPage();
await page.goto('https://example.com');
await browser.close();
A preset’s screen and viewport properties are still distinct. Do not treat a supplied screen size as a replacement for the viewport used by layout.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Changing dimensions after page creation
page.setViewportSize() resizes the page after a context or page exists:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
await page.setViewportSize({ width: 1024, height: 768 });
Set the size before navigation whenever possible. Sites often select a layout, load a menu variant or calculate image sizes during initial load. Resizing afterward may leave application state that was initialized for the old dimensions.
There is an important side effect: Playwright documents that page.setViewportSize() resets the screen size. If your scenario needs independent viewport and screen values, configure both on browser.newContext() and create a new context for each combination instead of mutating the page-level viewport.
Common mistakes and fixes
Setting screen and expecting a larger layout
Symptom: window.screen.width is 1920, but the site still shows the 1365-pixel layout. Cause: layout follows viewport. Fix: change viewport.width and leave screen as the independent display value.
Using screen.width for breakpoint assertions
Symptom: a test passes on one configuration but fails when the browser window changes. Cause: the assertion reads display geometry rather than page content width. Fix: assert visible UI, computed styles, window.innerWidth or the intended CSS behavior.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Changing viewport and losing screen
Symptom: a previously configured screen value returns to a default-like value after resizing. Cause: setViewportSize() resets screen size. Fix: configure both at context creation and avoid the page-level mutation for that test.
Non-repeatable CI dimensions
Symptom: parallel workers choose different breakpoints. Cause: viewport: null uses each host window. Fix: use explicit width and height for every context, especially in CI.
Screen option appears to do nothing
Symptom: page code does not observe the configured screen dimensions. Cause: screen emulation is only applied when a viewport is set. Fix: provide both viewport and screen in newContext().
Choosing a configuration
- Testing CSS responsiveness: fixed viewport only.
- Testing code that reads display geometry: fixed viewport plus explicit screen.
- Testing a known phone or tablet profile: device descriptor, with a viewport override only when required.
- Testing host-window integration:
viewport: null, isolated from deterministic CI tests and documented as host-dependent. - Testing several sizes: create separate contexts or projects so each run starts with known values.
Or skip the browser setup
If your goal is a rendered image rather than an interactive Playwright assertion, ScreenshotNeo provides a one-request screenshot API. It accepts the consent banner like a visitor, removes more than 60 known consent platforms plus newsletter popups and chat widgets before capture, and bills only clean shots. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and each response identifies the result with X-Page-Verdict and X-Billed headers.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →See the parameter reference in the ScreenshotNeo documentation. A basic call is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Cost, performance and reliability considerations
Viewport and screen values themselves do not add a separate Playwright charge; they are emulation settings. The practical cost is the browser work required by each test. Reusing a browser process while creating isolated contexts usually gives cleaner test boundaries than repeatedly launching browsers. Keep dimensions fixed so screenshots and assertions can be compared across workers. When a page changes layout after navigation, investigate application resize handlers and late-loading fonts or images rather than assuming screen and viewport are interchangeable.
Frequently Asked Questions
Does setting viewport change window.screen?
Not when configured independently at context creation. However, Playwright documents that page.setViewportSize() changes the viewport and resets screen size.
Can I set screen without setting viewport?
No. Playwright applies the screen option only when a viewport is set.
Why are innerWidth and screen.width different?
They represent different layers: innerWidth is the page viewport, while screen.width is the emulated display geometry.
What should I use for a visual screenshot test?
Use a fixed viewport that matches the intended browser content area. Add screen only if page code explicitly depends on screen metrics.
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.
Recommended Free Tools

