Recommended Free Tools
To take a Playwright screenshot in Docker, provide a compatible Node.js runtime, the Playwright package, the browser binaries Playwright expects, and the browser’s operating-system dependencies. Then use page.screenshot() for the viewport or full page, or a locator’s screenshot() method for one element. The official Playwright image supplies browsers and system dependencies, but not the Playwright package; install that separately and keep its version aligned with the image.
What a Docker screenshot setup needs
A screenshot call runs in the same environment as the browser. The container therefore needs all four of these pieces:
- Node.js, to run the script or Playwright Test.
- The Playwright npm package, which provides the API used by the script.
- The browser binary—Chromium, Firefox, or WebKit—that the project will launch.
- Operating-system libraries and other browser dependencies required by that browser.
The official Playwright Docker documentation explains that its image includes browsers and browser system dependencies, but the Playwright package itself must be installed separately. For a custom image, Playwright’s browser installation guidance shows installing a browser and its OS dependencies through the Playwright CLI.
Choose one browser unless your tests require more. Each browser adds installation and image-size overhead; no general performance figure applies to every container or workload.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Compatible with Nintendo Switch 2’s new GameChat mode
- Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
- Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
- Built-In Mic: The built-in microphone lets others hear you clearly during video calls
- Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works
Choose an image and keep versions aligned
Use the official Playwright image
The official image is convenient when you want its preinstalled browser binaries and dependencies. Add your project’s Playwright package yourself. Pin an image version rather than relying on a floating tag, and align it with the Playwright package version your project uses: the Docker guide warns that mismatches can prevent Playwright from locating browser executables.
The Docker documentation’s supported image tags and base-image details can change. Check the current official Docker page before selecting an exact tag; do not copy a tag from an old example without verifying it.
Build from a Node image
A custom image gives you control over the base image and installed components. After adding Playwright to the project, install the matching browser and OS dependencies, for example:
npx playwright install --with-deps chromium
Change chromium to the browser required by your suite. Browser binaries are tied to Playwright versions, so reinstall them after changing the package version when necessary. Confirm that the package used at runtime matches the version used to install the browser.
Mind the Linux distribution and trust boundary
According to the official Docker guide, Playwright’s Firefox and WebKit builds use glibc; Alpine and other musl-based distributions are unsupported for those builds. Do not assume that installing a browser package on Alpine makes those Playwright browser builds compatible.
Rank #2
- Compatible with Nintendo Switch 2’s new GameChat mode
- Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
- The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
- C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
- The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
The documented container runs as root by default, which disables Chromium’s sandbox. Playwright says this can be acceptable for trusted end-to-end test code, but does not recommend the image for visiting untrusted websites. Treat arbitrary URLs, user-submitted pages, and hostile content as untrusted; a test container is not automatically a safe general-purpose browsing environment.
Run a script and save a screenshot
Install the playwright package in the project and ensure the selected browser is installed in the image. This minimal CommonJS script navigates to a page, saves a viewport screenshot, and closes the browser:
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
} finally {
await browser.close();
}
})();
Run it from the container’s working directory with Node. A relative path is resolved from the process working directory, not from the source file’s location. Make sure the destination directory exists and is writable. If the container is ephemeral, copy the resulting file out or mount a volume at the output location so it survives container exit.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsThe example uses Chromium; use firefox or webkit from the Playwright package and install the corresponding browser if the project requires another engine. Browser choice matters for cross-browser checks because rendering can differ.
Choose what to capture
Viewport, full page, or one element
- Viewport:
await page.screenshot({ path: 'viewport.png' })captures the currently visible page area. - Full scrollable document:
await page.screenshot({ path: 'full-page.png', fullPage: true })captures beyond the viewport. Lazy-loaded content may need to be brought into view or otherwise loaded before capture. - One element:
await page.locator('.header').screenshot({ path: 'header.png' })captures the locator’s element rather than the entire page. Use a selector that identifies the intended element uniquely and wait for it if the page renders it asynchronously.
These forms follow Playwright’s screenshot guide and Page and Locator API references. Locator screenshots are useful for focused component evidence; full-page captures are more useful when the entire document matters.
Rank #3
- 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
- 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
- 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
- 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
Save a file or keep image bytes
Providing path writes an image file. Omitting it returns image bytes, which you can pass to another library or attach to a test report instead of writing locally. If you depend on a specific format, quality, or output scale, set the relevant screenshot option explicitly and check the current API reference for the selected Playwright version.
Screenshot options include image type, quality, and scale. CSS scale produces one pixel per CSS pixel; device scale uses device pixels and can create larger high-DPI output. Higher-resolution or full-page output can increase storage and transfer size, so select the smallest output that serves the artifact’s purpose. Quality applies to supported lossy image output; do not assume it has the same effect on every format.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Make repeat captures interpretable
Animations, rotating banners, timestamps, and other dynamic content can make screenshots differ. The screenshot APIs provide controls such as disabling animations and injecting screenshot-only CSS styles. Use them selectively: masking or changing content can improve repeatability, but it also changes what the captured image represents. Document intentional masks or style changes when the screenshot is evidence for a test.
Use screenshots as Playwright Test artifacts
Keep images when a test fails
If the project uses Playwright Test, configure automatic screenshots in the test configuration’s use options. For example:
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
screenshot: 'only-on-failure',
},
});
The documented modes include on, only-on-failure, and on-first-failure. The first captures for tests regardless of outcome; the latter modes limit capture to failure scenarios. Choose based on how much artifact storage your CI system retains and how much evidence your debugging workflow needs. See the current Playwright Test options reference.
Compare against a visual baseline
For visual regression checks, use Playwright Test’s toHaveScreenshot() assertion. It waits for two consecutive screenshots to match before comparing them, which helps avoid capturing a still-changing page. Assertions can include full-page capture and controls for animation disabling, masking dynamic regions, and thresholds. This is a test-runner feature, not a replacement for calling page.screenshot() in a plain Node script. See PageAssertions for the current assertion options and behavior.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #4
- 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
- Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
- Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
- Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
- High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
Visual baselines can vary across operating systems, browsers, fonts, and rendering environments. Run baseline generation and comparison in a consistent container setup; otherwise, environmental differences can look like product changes.
Make screenshot files available outside the container
A path inside a container is not automatically a path on the host or a persistent CI artifact. Choose a workflow deliberately:
- For a one-off run, write into a known output directory and copy the file from the stopped or running container using your container runtime’s copy mechanism.
- For repeated local or CI runs, mount a host or CI workspace directory at the output path, then write screenshots there.
- For Playwright Test, use the runner’s reported artifacts and configure the CI system to retain the relevant output directory.
- For in-memory processing, omit
pathand consume the returned image bytes before the process exits.
Keep generated files out of source control unless they are intentional visual baselines. Full-page or device-scale images may be substantially larger than viewport captures; retention policy and upload cost depend on your CI provider, so measure your own artifact volume rather than relying on a universal estimate.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common Docker screenshot failures
Playwright cannot find the browser executable
Likely cause: The package version and image/browser installation are out of sync, or the browser was never installed. Fix: Pin and align the Playwright package and image versions, then install the matching browser with Playwright’s CLI. Reinstall browser binaries after a package upgrade if necessary.
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 minuteBrowser launches locally but fails in the container
Likely cause: Missing operating-system browser dependencies or an incompatible base distribution. Fix: Use an official Playwright image or run npx playwright install --with-deps chromium in a compatible custom image. If using Firefox or WebKit, avoid Alpine/musl as the Playwright Docker guide says those builds require glibc.
Best Value
- Compatible with Nintendo Switch 2’s new GameChat mode
- HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
- Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
- Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
- Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video
The screenshot is missing after the container exits
Likely cause: The file was written only to the container’s writable filesystem, or to a different working directory than expected. Fix: Use an absolute or verified output path, ensure its directory exists and is writable, and mount or copy the output to persistent storage.
The screenshot is blank, incomplete, or captures the wrong area
Likely cause: Navigation or rendering has not reached the state the capture needs, the wrong scope was selected, or a selector matched an unintended element. Fix: Wait for an appropriate page state or target selector, inspect the selected locator, and choose viewport, fullPage, or locator capture intentionally. A full-page screenshot includes the scrollable document, but content loaded only after scrolling may need to be triggered first.
Visual tests fail intermittently
Likely cause: Dynamic page content, animation, or environmental differences. Fix: Prefer toHaveScreenshot() for baseline comparison, since it waits for consecutive matching captures; stabilize only the dynamic regions that should not determine the test, and keep the CI browser and environment consistent.
The container is being used against untrusted URLs
Likely cause: A test image is being treated as an isolated public browsing service. Fix: Do not use the documented root-running configuration to visit untrusted sites. Use an environment designed and configured for that threat model, and review the current Playwright Docker security guidance before exposing browser execution to external input.
Or skip the browser setup
If you need a screenshot from an API rather than a browser container, ScreenshotNeo returns an image or PDF from one GET request. Its API can accept the URL and return a clean shot; it removes cookie/consent banners, newsletter popups, and chat widgets before capture, with each cleanup step switchable. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.
Example cURL request, saving a WebP shot:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for the API options and authentication details. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up free for ScreenshotNeo.
Frequently asked questions
Can I take screenshots without Playwright Test?
Yes. A regular Node script can launch a browser and call page.screenshot(). Playwright Test is needed for its automatic test artifacts and screenshot assertions, not for the basic screenshot API.
Does fullPage: true mean the browser has loaded every image?
Not necessarily. A full-page capture covers the scrollable document, but lazy-loaded resources may not load until their content is brought into view. Trigger the page behavior needed to load them before capture.
Which browser should a Docker screenshot script use?
Use the browser your application or test suite needs. Chromium, Firefox, and WebKit are available through Playwright, but they require their matching binaries and compatible dependencies; cross-browser projects should capture with each engine they intend to validate.
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.

