What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Set the WebDriver window dimensions before capturing. In Python, call driver.set_window_size(1920, 1080) before the screenshot. That requests a window size in pixels; it does not guarantee that every browser and runtime will write a PNG with exactly 1920 × 1080 physical pixels. If exact output dimensions matter, inspect the saved image in the environment where your code runs.
Set the browser window size before the screenshot
Selenium controls the browser window through WebDriver. The width and height passed to set_window_size(width, height) are the requested window dimensions, in pixels. Set them before navigating or capturing so the page lays out for the intended viewport from the start.
from selenium import webdriver
# Start Chrome, request a 1920 x 1080 browser window,
# load the page, and save the current window as a PNG.
driver = webdriver.Chrome()
try:
driver.set_window_size(1920, 1080)
driver.get("https://example.com")
driver.save_screenshot("/absolute/path/screenshot.png")
finally:
driver.quit()
Replace /absolute/path/screenshot.png with a writable absolute path on the machine running the script. Selenium recommends a full path and a .png filename for save_screenshot. The method saves the current window as a PNG and reports whether the save succeeded; if you need to handle failure explicitly, check its return value.
Windows 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 reinstallOutdated 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 matchWhat 1920 × 1080 means here
The call requests the browser window’s width and height. It is not a universal promise about the final file’s physical pixel dimensions. Operating-system display scaling, browser zoom, headless configuration, and device-pixel ratio can affect how requested dimensions correspond to pixels in the output. WebDriver’s sizing API establishes the requested window rectangle; the resulting image is the final authority when a downstream system requires exact dimensions.
#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
There is also a difference between the browser window and the page’s content area. Window dimensions refer to the window rectangle, while browser interface such as toolbars may occupy space around the page. Consequently, a 1920 × 1080 window request should not be casually described as a guaranteed 1920 × 1080 page viewport or PNG. If the requirement is an exact viewport or image size, verify both the page layout and the saved file in the target runtime.
Use the W3C window-rectangle method when you need it
For W3C-compatible browsers, Selenium also exposes set_window_rect, which sets window position and size. To request the same dimensions without changing position, provide only width and height:
driver.set_window_rect(width=1920, height=1080)
Use one sizing call, then capture. The two APIs express the same practical goal here: ask WebDriver for a window of the requested size. set_window_rect is useful when your automation also needs to control the window’s position; set_window_size is the direct option when only size matters. Availability and behavior can vary by browser implementation, so validate the method in the browser and runtime you deploy.
Choose the right kind of screenshot
Before debugging dimensions, decide what the image is supposed to contain. Selenium’s ordinary screenshot operation captures the current window. It does not, by itself, mean “capture the entire document.” The distinction matters on long pages and in responsive-layout checks.
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
- Visible-window capture: use the current window screenshot when you need what is visible in the browser at that moment.
- Full-document capture: use a browser or binding capability that explicitly supports full-document screenshots if the whole page is required. Firefox’s WebDriver API documents full-document screenshot support; do not assume the ordinary current-window operation has that behavior across browsers.
- In-memory image: use PNG bytes or base64 text when another part of your program will consume the image rather than a file on disk.
Chromium’s WebDriver API exposes window sizing and current-window PNG capture. Firefox’s API exposes the same sizing methods and documents full-document screenshot support. Because capture support and runtime details are implementation-specific, check the relevant browser’s binding documentation when relying on behavior beyond the basic window screenshot.
Save the PNG or keep it in memory
For a file, save_screenshot is the straightforward Python method. For data that should remain in memory, use get_screenshot_as_png() to obtain PNG bytes, or get_screenshot_as_base64() to obtain base64 text. For example, the following keeps the image bytes instead of writing a file:
from selenium import webdriver
with webdriver.Chrome() as driver:
driver.set_window_size(1920, 1080)
driver.get("https://example.com")
png_bytes = driver.get_screenshot_as_png()
# png_bytes can now be passed to code that accepts PNG bytes.
The content is still a screenshot of the current window; changing from a file method to a byte-returning method does not change the capture area or resolution behavior. If the receiver needs base64, use the base64 method rather than encoding the PNG bytes a second time.
Recommended Free Tools
Java and JavaScript equivalents
The same WebDriver idea is available in other language bindings. The following examples show the sizing call and screenshot operation; screenshot return types and saving the result are binding-specific.
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.
Java
import org.openqa.selenium.Dimension;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
// Assume driver has been created and navigated to the target page.
driver.manage().window().setSize(new Dimension(1920, 1080));
byte[] png = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
Use the file output type instead if your Java code should write the screenshot directly as a file. The exact imports and driver lifecycle depend on the surrounding application.
JavaScript
// Assume driver has been created and navigated to the target page.
await driver.manage().window().setRect({ width: 1920, height: 1080 });
const pngBase64 = await driver.takeScreenshot();
The JavaScript example returns screenshot data as a base64 string. Decode it using the file or buffer APIs for your Node.js version if you need to write a PNG. In each binding, verify the generated file’s dimensions rather than treating the requested rectangle as proof of the physical image size.
Or skip the browser setup
If you need a screenshot of a public page rather than Selenium-controlled browser automation, ScreenshotNeo can capture a URL through one API request. It is a website screenshot API and MCP server; it does not replace Selenium for tests that need to drive a browser session or interact with application state. Its viewport options and output settings are documented at ScreenshotNeo API documentation.
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://example.com -o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; those cleanup steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports page verdict and billing status in headers. Its MCP server provides screenshot tools for AI agents, including 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. Use the docs for viewport and output options, then sign up free to try it with 1,000 screenshots a month and no card.
Check the actual output when dimensions are strict
- Set the window before loading the page. This gives the site a chance to lay out at the intended dimensions rather than first rendering at a default size.
- Capture using the method that matches your requirement. Use the normal screenshot for the current window; choose a documented full-document capability if the entire page is needed.
- Inspect the PNG file’s width and height. Do this in the same operating system, browser mode, and deployment environment that will produce the screenshots.
- Inspect the page viewport too if layout is the goal. A file’s pixel dimensions and the dimensions used by responsive CSS are related, but they are not the same measurement in every runtime.
- Adjust the runtime setup only after measuring. If file dimensions differ from the target, test window sizing, browser zoom, display scaling, and headless configuration independently, then recheck the resulting PNG.
This verification step is especially important for image pipelines that reject mismatched dimensions, visual-regression baselines, and screenshots used as fixed-size assets. The Selenium API specifies the requested window dimensions, but it does not establish one physical-pixel outcome across every operating system and browser configuration.
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
Troubleshooting Selenium screenshot dimensions
The PNG is not exactly the requested width or height
First check what you measured: the requested window rectangle, the page viewport, or the PNG’s pixel dimensions. These are not interchangeable. Confirm that sizing happens before navigation and inspect the output in the target runtime. Display scale, zoom, and headless behavior may affect the physical result; the API does not promise exact pixel-for-pixel equivalence in every setup.
The page layout still looks like a mobile or narrow layout
Confirm that the size call completed before the page was loaded and that the browser window actually changed. Then inspect the page’s viewport and responsive layout in that runtime. A window request is not a device-emulation setting, so do not infer that it sets a particular device profile or pixel ratio.
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 →Scan for outdated or missing drivers - takes under a minuteDriver Scan →The screenshot is missing content below the fold
The ordinary current-window screenshot captures the current window, not necessarily the complete document. If the use case requires a full-page image, use a browser capability that documents full-document capture and confirm it in the browser you run. Firefox documents this support; do not generalize it to all browser implementations without verification.
The image was not written where expected
Use an absolute, writable output path with a .png extension. Check the return value from save_screenshot and ensure the script reaches the save call before the driver is closed. If your code needs an image for immediate processing rather than a disk file, use the PNG-bytes method.
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 browser rejects the rectangle operation
Try the binding’s documented set_window_size call for a size-only request, or check whether the browser supports the W3C-compatible set_window_rect method. Browser and runtime support can differ; isolate the failing call from navigation and screenshot code to identify whether sizing or capture is the problem.
Practical reliability and cost considerations
For repeatable automation, make the dimensions explicit on every run instead of relying on a browser’s startup default. Keep the capture environment consistent and record the output dimensions as part of any visual-test artifact check. This turns an ambiguous “looks wrong” failure into a measurable mismatch between requested window size, page viewport, and image pixels.
Screenshot capture itself is generally a small part of a Selenium workflow; starting a browser, loading the page, and waiting for the relevant content can dominate the time. Do not add arbitrary waits solely to influence resolution. If content must be present before capture, wait for the relevant application state in your test, then capture after the requested window size has been set.
For a self-hosted Selenium workflow, the resource cost includes running browser processes and the infrastructure that hosts them; no universal timing or cost figure is established, so measure the load in your own test environment. A screenshot API instead charges according to its own plan and billing rules; ScreenshotNeo reports whether a response was billed, including cases such as failed loads and cache hits. Choose between them based on whether you need browser automation and session control, or a URL-to-image service.
Frequently Asked Questions
Does setting a 1920 × 1080 window also emulate a 1920 × 1080 device?
No. The call requests window dimensions; it does not, by itself, select a device profile or establish a particular device-pixel ratio.
Can I use the same Selenium size call in Chromium and Firefox?
Both browser WebDriver APIs expose window-sizing methods, but validate behavior in the exact browser and runtime you deploy, especially when you depend on full-document capture or exact physical image dimensions.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteQuick 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.

