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 & 11Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Playwright’s documented default viewport is 1280 × 720 pixels. That fixed, emulated page size applies to a normal browser context and to Playwright Test unless your configuration, a device preset, or another setting overrides it. It is not a statement about the physical dimensions of the computer running the test.
What does Playwright mean by the default viewport?
A viewport is the area of a page that the browser presents as its visible content region. In Playwright, the standard default is a width of 1280 CSS pixels and a height of 720 CSS pixels. The BrowserContext API describes that value as the default, and Playwright Test’s testOptions.viewport uses the same dimensions.
That default gives runs a consistent page size: a page starts with the same viewport dimensions even if the test runs on machines with different monitor sizes. It does not mean that the browser window, monitor, or screenshot file must physically measure 1280 by 720 pixels. Device scale factor, screenshot options, and other capture settings can affect the relationship between CSS pixels and image pixels.
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 glitchesThe figure applies when the documented defaults are in effect. A device descriptor, explicit configuration, or a later call that changes the page viewport can produce different dimensions. Do not assume every Playwright project uses 1280 × 720 merely because that is the default.
#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
Does the default apply to BrowserContext and Playwright Test?
BrowserContext
When creating a browser context without a different viewport configuration, Playwright uses 1280 × 720. You can also state the value explicitly, which makes the intended test setup visible to readers and prevents a later configuration change from silently changing the test’s assumptions.
const context = await browser.newContext({
viewport: { width: 1280, height: 720 },
});
const page = await context.newPage();
This example assumes browser has already been launched. The viewport belongs to the context, so pages created in that context use its configured dimensions unless you change a page’s viewport separately.
Playwright Test
In Playwright Test, set the value under use in the configuration. The following is a complete configuration file for the viewport setting:
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
viewport: { width: 1280, height: 720 },
},
});
If viewport is omitted and no other setting changes it, Playwright Test uses the documented 1280 × 720 default. Writing it explicitly is helpful when viewport dimensions are part of the test’s acceptance criteria or when different projects need different screen sizes.
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
How do I change the Playwright viewport size?
Choose a fixed viewport when consistency matters
Set viewport to an object containing numeric width and height values. For example, this Playwright Test configuration uses a 1440 × 900 CSS-pixel viewport:
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
viewport: { width: 1440, height: 900 },
},
});
The dimensions in that example are a chosen override, not another Playwright default. Select dimensions that match the layout condition you intend to test, and use the same values in runs you want to compare.
Resize a page during a test
Use page.setViewportSize() when a test needs to resize after creating the page. Set the size before navigation when the site reacts to viewport changes during startup or chooses its layout during initial page loading.
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto('https://example.com');
The example sets dimensions before navigation, as is often useful for pages that are sensitive to their initial size. Replace the URL with the site under test. If your test specifically checks responsive changes after load, resize at the point in the test where that change is intended.
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.
Use a device preset and override its viewport
A device preset can provide a viewport different from the standard default, along with other device-emulation settings. If you want those settings but need a particular viewport, spread the preset first and put your explicit viewport after it:
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
use: {
...devices['Desktop Chrome'],
viewport: { width: 1280, height: 720 },
},
});
Object properties written later override earlier ones. Reversing the order can let the preset’s viewport replace your explicit dimensions, so check the ordering when the configured size is not the one you expect.
What does viewport: null do?
Setting viewport: null opts out of Playwright’s consistent viewport emulation. The dimensions then depend on the host window size. Playwright warns that this can make test execution nondeterministic: the same page may render differently when the window dimensions differ between environments or runs.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
viewport: null,
},
});
Use this only when tying the page to the host window is intentional. For reproducible screenshots, layout assertions, and CI comparisons, a fixed viewport is generally easier to reason about. If you choose null, record or control the host window conditions that matter to your test rather than treating the result as a fixed-size emulation.
Rank #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
Viewport, screen size, and device scale factor are different settings
Playwright documents viewport, screen, and deviceScaleFactor as separate browser-context settings. They are related, but they answer different questions:
viewport: the emulated page viewport dimensions, such as 1280 × 720 CSS pixels.screen: the emulated screen dimensions. Configuring a screen size is not the same as setting the page viewport to that size.deviceScaleFactor: the scale factor between CSS pixels and device pixels. The BrowserContext API documents a default of 1.
Changing one does not mean you have changed the others. If a test is meant to represent a particular device, decide which dimensions and scale settings it needs, and configure them together deliberately. A 1280 × 720 viewport alone does not establish a particular physical display size or a high-density device setting.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common viewport problems and how to fix them
The page is not 1280 × 720
- Check whether the project sets
use.viewportin its Playwright Test configuration. - Check whether a device preset is spread after your explicit viewport and overwrites it. Put the explicit viewport after the spread.
- Check for a
page.setViewportSize()call that changes the page later in the test. - Check whether the context uses
viewport: null, which relies on host-window dimensions instead of fixed emulation.
Runs look different across machines
A fixed viewport removes one source of environmental variation. If the configuration uses null, the host window can change the viewport. Also verify that the runs use the intended device preset and that no later page resize changes the dimensions. Do not infer viewport dimensions from the monitor’s advertised resolution.
The page chooses the wrong responsive layout at startup
Set the desired dimensions before navigation. The Playwright emulation guide recommends setting the viewport size before navigating for sites that are sensitive to page size. If a test intentionally examines a post-load responsive transition, keep the resize after navigation and assert the resulting behavior explicitly.
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.
The screenshot’s pixel dimensions differ from the viewport
Viewport dimensions describe the emulated page area in CSS pixels; they are not a universal guarantee of the output image’s pixel dimensions. Device scale factor and screenshot capture choices are separate considerations. Check each setting independently before diagnosing an apparent mismatch.
Choosing a viewport for reliable tests
- Use an explicit fixed viewport for tests that compare layout, visual output, or responsive breakpoints across runs.
- Use a device preset when the test needs the preset’s device-emulation settings, and override its viewport only when a particular size is intended.
- Use
viewport: nullonly when host-window-dependent behavior is part of the test objective. - For a site with multiple responsive states, create separate configurations or tests for the specific sizes you need instead of relying on an unspecified host size.
- Set the viewport before navigation if initial rendering depends on page dimensions.
Playwright’s own BrowserContext API, TestOptions documentation, and emulation guide are the relevant references for these behaviors. Their current documentation gives the default but does not supply a publication date here; treat project-specific overrides as authoritative for an individual test run.
Or skip the browser setup
If your goal is to obtain a webpage screenshot rather than configure a Playwright test, ScreenshotNeo is a screenshot API and MCP server. It is an alternative to running your own browser automation; it does not change Playwright’s default viewport or configure a Playwright project. The API returns a screenshot or PDF from a GET request. See the ScreenshotNeo documentation for API options.
Free tools Windows power users keep installed
One-click scans. No signup required.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo 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, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is available on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
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.

