The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Install Playwright for Python, install its browser binaries, then open a page and call page.screenshot(). Use full_page=True for the whole scrollable document or a locator’s screenshot() method for one element. The guide below uses Playwright’s synchronous API, then covers async use, Windows-specific setup, output choices, and common fixes.
Install Playwright and its browsers on Windows
The Python package and browser binaries are separate. In PowerShell, run:
python -m pip install --upgrade pip
python -m pip install playwright
playwright install
If PowerShell cannot find the playwright command, run the installer through Python instead:
python -m playwright install
Playwright’s installation guide lists Python 3.8 or later and Windows 11 or later, Windows Server 2019 or later, or WSL among supported environments. Check the current installation requirements if you use an older Windows release or a managed environment.
#1 Best Overall
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
Take a website screenshot with synchronous Python
Save this as screenshot_site.py and run python screenshot_site.py. It opens Chromium, navigates to the target, saves a viewport screenshot, and closes the browser even if an error occurs.
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
try:
page = browser.new_page()
page.goto("https://example.com", wait_until="load")
page.screenshot(path="screenshot.png")
finally:
browser.close()
The output path is relative to the process’s current working directory. To save to a specific Windows location, use a raw string such as r"C:UsersYourNamePicturessite.png" or escape the backslashes.
Choose what to capture
Visible viewport
The default page.screenshot() captures the current viewport. Set the viewport before navigation if you need predictable dimensions:
Rank #2
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
- 4GB DDR4 System Memory; 128GB Solid State Drive
- 11.6" HD (1366 x 768) Multi-Touch Display
- Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
- Windows 11 Pro
page.set_viewport_size({"width": 1440, "height": 900})
page.goto("https://example.com")
page.screenshot(path="viewport.png")
Full scrollable page
Pass full_page=True to capture the full scrollable document in one tall image:
page.screenshot(path="full-page.png", full_page=True)
For pages that load images or other content only as you scroll, a full-page capture may not trigger every lazy-loaded item. If the result omits content, scroll through the page first or otherwise wait for that page’s content to load before capturing.
One element
Use a locator when you need just a component, such as a header or product card. Locator screenshots are preferable to the discouraged ElementHandle screenshot API:
Rank #3
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
page.locator(".header").screenshot(path="header.png")
The locator must match an element that is present and visible. To make a capture less sensitive to animation, disable animations:
page.locator(".header").screenshot(
path="header.png",
animations="disabled",
)
Keep the image in memory
Omit path when you want the screenshot bytes for image processing or comparison instead of writing a file:
image_bytes = page.screenshot(full_page=True)
See Playwright’s screenshot guide for screenshot options such as format, clipping, and image quality.
Rank #4
- EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
- 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
- RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
- ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
- LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.
Use the asynchronous API
For an async application, use async_playwright and await browser and page operations:
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch()
try:
page = await browser.new_page()
await page.goto("https://example.com", wait_until="load")
await page.screenshot(path="screenshot.png", full_page=True)
finally:
await browser.close()
asyncio.run(main())
On Windows, Playwright’s async subprocess use requires a Proactor event loop. Python 3.8 and newer uses it by default; if a framework or application has replaced the default loop and Playwright reports a subprocess or event-loop error, check and restore the Proactor loop. The Playwright library guide documents the Windows async requirement.
Browser choices, versions, and Windows storage
Playwright can launch Chromium, Firefox, or WebKit. Chromium is used in the examples; choose another engine when your testing or rendering target calls for it. If Microsoft Edge is installed, you can select its channel through Chromium:
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 matchBest Value
- WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
- 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
- 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
- CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
- LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
browser = p.chromium.launch(channel="msedge")
Browser binaries are tied to Playwright releases. The Playwright documentation notes, “Each version of Playwright needs specific versions of browser binaries to operate.” After updating the Python package, run playwright install (or python -m playwright install) if the required browser revision is missing. The default Windows browser cache is %USERPROFILE%AppDataLocalms-playwright. Details are in the official browser documentation.
Wait for the right page state
A screenshot reflects the page state at capture time. page.goto() can wait for different navigation milestones; the examples use wait_until="load". For pages that render important content after the initial load, wait for a meaningful selector rather than relying only on a fixed delay:
page.goto("https://example.com", wait_until="load")
page.locator("main article").wait_for(state="visible")
page.screenshot(path="article.png")
Choose a selector that is specific to the content you need. Waiting for an element that never appears will time out; handle that as a page-specific failure rather than saving a misleading partial capture.
Troubleshooting
- Browser executable missing: Install the browser binaries for the same Python environment that runs your script with
python -m playwright install. The package and browsers are installed separately, and browser revisions track Playwright releases. - PowerShell cannot find
playwright: Usepython -m playwright installso the CLI runs through that Python interpreter. - Async subprocess or event-loop error: On Windows, confirm the app uses a Proactor event loop. Python 3.8+ selects it by default unless application or framework code overrides it.
- Screenshot saved in an unexpected folder: A relative path is resolved from the process working directory. Use an absolute path, with a raw string or escaped backslashes, to choose a known destination.
- Only the visible portion appears: Set
full_page=Truefor the whole scrollable page. For one component, usepage.locator("selector").screenshot(...). - Element capture is unstable: Disable animations with
animations="disabled"in the locator screenshot call. If an element is missing, first wait for its locator to become visible. - Full-page output misses deferred images: Scroll through the page or wait for lazy content to load before taking the full-page capture; full-page sizing alone does not guarantee every site has fetched deferred assets.
- Navigation times out or shows an incomplete page: Check whether the page needs a different readiness condition or a longer timeout, and wait for the specific content you intend to capture. A page can continue rendering after its initial load event.
Or skip the browser setup
If you do not want to install and maintain browser binaries, ScreenshotNeo offers a website screenshot API and MCP server. One GET request returns an image or PDF; the example below saves a WebP screenshot:
Recommended Free Tools
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 request options. ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps 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 for AI agents and MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up free for 1,000 screenshots a month with no card.
Frequently Asked Questions
Can Playwright save a screenshot as a PDF?
Yes. Use the page PDF API for PDF output; the ScreenshotNeo request shown above can also return a PDF.
Can I capture with Firefox or WebKit instead of Chromium?
Yes. Playwright supports Chromium, Firefox, and WebKit; install the required browser binaries and launch the corresponding browser type.
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.




