What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The shortest working solution is await page.screenshot({ path: 'screenshot.png' });. In a complete TypeScript script, launch Chromium, navigate to a URL, capture the page, and close the browser. Playwright captures the current viewport by default; add fullPage: true for the entire scrollable page or call screenshot() on a locator for one element.
Set up Playwright and TypeScript
Install Playwright in an existing Node.js project, or create a new project and add the package:
npm install playwright
npm install -D typescript tsx
The examples below use tsx so a .ts file can be run directly. You can also compile it with your normal TypeScript build configuration.
Take your first screenshot
Create screenshot.ts:
import { chromium } from 'playwright';
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
await browser.close();
Run it with:
npx tsx screenshot.ts
The file is written relative to the process’s current working directory. Playwright infers the image type from the extension: .png, .jpeg, or .webp. If you omit path, the method returns image bytes instead of creating a file, which is useful when uploading the result or passing it to another library.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
const imageBytes = await page.screenshot();
// imageBytes is a Buffer
Choose what to capture
| Goal | Code | Result |
|---|---|---|
| Visible viewport | await page.screenshot({ path: 'viewport.png' }); |
The current viewport; this is the default. |
| Entire page | await page.screenshot({ path: 'full-page.png', fullPage: true }); |
The full scrollable page, including content below the fold. |
| One element | await page.locator('.header').screenshot({ path: 'header.png' }); |
The locator’s bounding box, scrolled into view as needed. |
| Rectangle | await page.screenshot({ path: 'area.png', clip: { x: 0, y: 0, width: 800, height: 600 } }); |
A specific page-coordinate rectangle. |
Prefer a locator over a hard-coded rectangle when the target is a semantic component. Locators survive layout changes better and make the intent of a test clear.
Control image format, size, and transparency
These options cover most export requirements:
type: explicitly select'png','jpeg', or'webp'. If you provide a path, its extension normally determines the type.quality: set JPEG or WebP quality. It has no effect on PNG.scale:'css'produces one image pixel per CSS pixel;'device'uses device pixels and can create larger high-density images.omitBackground: set it totrueto preserve transparency instead of painting the default white background. Do not use this for JPEG, which has no alpha channel.clip: providex,y,width, andheightto limit the capture.
await page.screenshot({
path: 'card.webp',
type: 'webp',
quality: 82,
scale: 'css',
});
await page.screenshot({
path: 'logo.png',
omitBackground: true,
});
Use CSS scale for predictable visual-regression dimensions. Use device scale when you need a retina-sized asset for documentation or design review.
Make screenshots stable for visual regression
A screenshot can differ even when your application code has not changed. Fonts, animations, rotating banners, timestamps, ads, and asynchronous content all introduce pixels that are not useful for comparison.
Disable motion during capture
await page.screenshot({
path: 'stable.png',
animations: 'disabled',
});
animations: 'disabled' disables CSS animations, CSS transitions, and Web Animations for the capture. Finite animations are fast-forwarded; infinite animations are canceled during the screenshot.
Mask changing regions
await page.screenshot({
path: 'masked.png',
mask: [
page.locator('[data-testid="clock"]'),
page.locator('.personalized-recommendations'),
],
maskColor: '#808080',
});
The selected locator bounding boxes are covered before capture. The default mask color is pink (#FF00FF); maskColor lets you choose another color. Give dynamic components stable selectors such as data-testid so the mask remains intentional.
Wait for the page state you actually need
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.locator('[data-testid="dashboard"]').waitFor();
await page.screenshot({ path: 'dashboard.png', fullPage: true, animations: 'disabled' });
Waiting for a selector is usually more reliable than sleeping for an arbitrary number of milliseconds. If an application keeps long-lived connections open, networkidle may never be reached; wait for the specific content that makes the page complete instead.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Control the viewport and device scale
const page = await browser.newPage({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1,
});
Keep viewport dimensions, browser version, fonts, locale, and time zone consistent between baseline and comparison runs. A different device scale or missing font can create a large diff without any UI change.
Use Playwright Test screenshot assertions
For regression tests, use Playwright Test rather than manually comparing files:
Recommended Free Tools
import { test, expect } from '@playwright/test';
test('homepage matches the baseline', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveScreenshot('homepage.png');
});
Screenshot assertions work only with the Playwright test runner. The assertion takes two consecutive screenshots and waits for them to match before comparing with the stored expectation. You can pass capture options such as fullPage, mask, and animation control, plus comparison tolerances such as a maximum diff-pixel count.
await expect(page).toHaveScreenshot('account.png', {
fullPage: true,
animations: 'disabled',
mask: [page.locator('.last-updated')],
maxDiffPixels: 25,
});
Use a tolerance only for known rendering noise. A generous threshold can hide a real regression. Review the generated baseline and diff artifacts in version control or your CI job so a failed assertion is actionable.
Useful patterns for real projects
Capture after an interaction
await page.goto('https://example.com/settings');
await page.getByRole('button', { name: 'Advanced' }).click();
await page.locator('#advanced-panel').waitFor();
await page.locator('#advanced-panel').screenshot({ path: 'advanced-panel.png' });
Save bytes instead of a local file
const png = await page.screenshot({ type: 'png' });
await uploadToObjectStorage(png);
Returning bytes avoids a temporary file, but the rest of your code must handle the resulting Buffer and any upload retry logic.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Capture a long page with lazy content
fullPage: true captures the scrollable page. Sites that load images only after scrolling may still need an application-specific preparation step: scroll through the page, wait for the image selectors, then call the screenshot. Do not assume that a network-idle event means every lazy image is decoded and visible.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Troubleshooting common failures
The screenshot file is missing
Check the process working directory and the relative path. Use an absolute path or log process.cwd() when a CI runner writes artifacts somewhere unexpected. Make sure the parent directory already exists; create it before calling screenshot.
The page is blank or incomplete
Wait for a meaningful selector, confirm that page.goto did not fail, and inspect the response status. For client-rendered applications, navigate first, perform required authentication or clicks, then wait for the post-render element rather than capturing immediately.
Full-page output is unexpectedly tall or clipped
Check fixed-position elements, nested scrolling containers, and CSS that changes after scrolling. If the useful content lives inside a scrollable panel, capture that locator instead of the document, or use clip for a known region.
Visual tests fail intermittently
- Disable animations and transitions.
- Mask clocks, rotating content, avatars, and personalized modules.
- Wait for a stable selector instead of using a short timeout.
- Use a fixed viewport, device scale, locale, and time zone.
- Ensure the same fonts and browser version are installed in local and CI environments.
The image is too large
Use scale: 'css', capture a locator rather than a full page, choose WebP or JPEG when transparency is unnecessary, and set an appropriate quality value. PNG is lossless and can be substantially larger for photographic pages.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Only a test assertion API is available
toHaveScreenshot belongs to Playwright Test. In a plain Playwright script, use page.screenshot() or locator.screenshot() and compare or publish the bytes yourself.
Performance, reliability, and cost considerations
Launching a browser is relatively expensive compared with taking another screenshot in the same page. For batches, reuse one browser and create isolated pages or contexts rather than launching Chromium for every URL. Close pages and the browser in cleanup code so a failed capture does not leak processes.
Full-page captures require more memory than viewport captures, especially at device scale. Element screenshots are normally faster and produce smaller artifacts. Keep screenshots as build artifacts only when they are needed for review; otherwise, retain the diff and failure output from your test system.
For authenticated pages, create the context with the required storage state or headers and never commit credentials to the script. For repeatable baselines, pin the browser and dependencies in CI and treat intentional UI changes as explicit baseline updates.
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 & 11Outdated 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 matchOr skip the browser setup: ScreenshotNeo
If you need a screenshot service instead of managing Chromium, ScreenshotNeo returns a PNG, JPEG, WebP, or PDF from one GET request. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Failed bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers.
Here is the one-call cURL version (see the ScreenshotNeo documentation for parameters):
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
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,
)
r.raise_for_status()
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}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
When the API is a better fit
- Use full-page capture with lazy images, CSS-selector element capture, dark mode, device presets, arbitrary viewports, and retina scale without maintaining browser binaries.
- Use PDF paper size, margins, landscape mode, and page ranges when the deliverable is a document.
- Use custom CSS or JavaScript, clicks, selector or network-idle waits, hidden selectors, blocked ads or trackers, custom headers, cookies, user agents, Authorization, time zone, geolocation, transparent backgrounds, resizing, and configurable TTL caching for production workflows.
- Use signed links for public
<img>tags, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, the usage API, or the OpenAPI specification for integration work. Parameter names used by other screenshot APIs also work, which can simplify migration. - Connect an MCP server to Claude, Cursor, or another MCP client. Its tools include
take_screenshot,get_page_info, andcapture_pdf.
| Plan | Included screenshots | Price |
|---|---|---|
| Free | 1,000 per month | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing gives two months free, and every feature is included on every plan. Try ScreenshotNeo with 1,000 screenshots a month free, with no card required.
Frequently Asked Questions
Can I take a screenshot without saving a file in Playwright?
Yes. Omit the path option; page.screenshot() returns the image as a Buffer.
What is the difference between a page and locator screenshot?
A page screenshot captures the viewport, full document, or a clipped rectangle. A locator screenshot targets one matched element and is usually preferable for component-level checks.
Why does my screenshot assertion fail even though the page looks unchanged?
Uncontrolled animation, dynamic text, fonts, viewport dimensions, device scale, browser versions, and asynchronous content can change pixels. Disable motion, mask dynamic regions, wait for stable selectors, and standardize the test environment.
Does fullPage automatically load every lazy image?
It captures the scrollable page, but an application that loads images only after scrolling may need an explicit scroll-and-wait preparation step before the capture.
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.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →

