iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Start your local development server, then use Puppeteer to open its full http://localhost:PORT URL and save a screenshot with page.screenshot(). The example below captures the full page at http://localhost:3000; change the port and output path to match your project.
Take a screenshot of a localhost page with Puppeteer
Run the app first and confirm it loads in a browser on the same machine where Puppeteer will run. Then use Puppeteer’s screenshot flow: launch a browser, create a page, navigate with page.goto(), take the screenshot, and close the browser.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
const response = await page.goto('http://localhost:3000', {
waitUntil: 'networkidle2'
});
if (response && response.status() >= 400) {
throw new Error(`Local page returned HTTP ${response.status()}`);
}
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
This uses JavaScript module syntax, so the project must support import (for example, through its module configuration). Puppeteer’s page.goto() URL needs a scheme such as http://. Change 3000 to your server’s port and page.png to the destination filename you want.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Wait until the content you need is ready
waitUntil: 'networkidle2' is a useful starting condition: it waits for network activity to become quiet. It is not a guarantee that a particular application has finished rendering, that an animation has ended, or that every delayed asset has appeared. For dynamic pages, wait for an app-specific element or readiness condition before capturing.
#1 Best Overall
- [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
- [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
- [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
- [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
- [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)
await page.goto('http://localhost:3000', { waitUntil: 'domcontentloaded' });
await page.waitForSelector('[data-testid="report-ready"]');
await page.screenshot({ path: 'report.png', fullPage: true });
Replace the selector with an element that appears only when the content you want is ready. If the page never reaches network idle because it keeps polling or streaming, navigating with a less restrictive condition and then waiting for a specific element can be more appropriate.
Choose what to capture
Visible viewport
Omit fullPage to capture the current viewport:
await page.screenshot({ path: 'viewport.png' });
Entire document
Set fullPage: true to capture the full scrollable page rather than only what is currently visible:
Rank #2
- Model: Dell OptiPlex 7050 Small Form Factor (SFF)
- Processor: Intel Core i7-7700 3.60 GHz
- Memory: 32GB DDR4 Ram
- Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
- Operating System: Windows 11 Pro (64-bit)
await page.screenshot({ path: 'full-page.png', fullPage: true });
A specific element
Use an element handle when you only need one component. Puppeteer scrolls the element into view if necessary; it throws if the element has been detached from the DOM before the capture.
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 glitchesconst card = await page.waitForSelector('.report-card');
if (!card) throw new Error('Report card was not found');
await card.screenshot({ path: 'report-card.png' });
Set dimensions for repeatable screenshots
When image dimensions matter—for visual tests, documentation, or consistent previews—set the viewport explicitly before navigation. Puppeteer’s documented default headless screen is 800 × 600 when neither --screen-info nor --window-size is supplied.
Rank #3
- IMMERSIVE 24 INCH DISPLAY: Experience stunning clarity on a Full HD IPS screen with ultra-thin bezels, offering a 90% screen-to-body ratio that makes everything from spreadsheets to streaming come alive with vibrant colors and crisp details.
- POWERFUL INTEL PROCESSING: Tackle demanding tasks with ease thanks to the Intel processor and 16GB of high-speed memory, delivering smooth performance whether you're multitasking between applications or running productivity software.
- GENEROUS STORAGE: Store all your important files, photos, and programs with blazing-fast solid state drive technology that ensures quick boot times, rapid file access, and plenty of space for your digital life.
- ENHANCED PRIVACY AND COLLABORATION: Work confidently with the pop-up privacy camera that tucks away when not in use, plus dual microphones with noise reduction for crystal-clear video calls that keep you connected professionally.
- ECO-CONSCIOUS DESIGN: Feel good about your purchase with an EPEAT Gold registered and ENERGY STAR certified computer that combines premium performance with responsible environmental manufacturing practices.
const page = await browser.newPage({
viewport: { width: 1440, height: 900 }
});
await page.goto('http://localhost:3000', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'desktop.png', fullPage: true });
Choose dimensions that match the layout you intend to inspect. For a mobile layout, use a narrower viewport instead. Keep the viewport and browser configuration the same between runs if you are comparing screenshots.
Common problems and fixes
- The capture fails to load. Confirm the development server is running, then check the URL scheme, port, and path. Puppeteer must run somewhere that can reach that localhost server.
- The screenshot is blank or shows an error page. Check the navigation response status. In headless shell mode,
page.goto()does not necessarily throw for a valid HTTP error response such as 404 or 500; inspect the returned response and fix the route or server error. - Some content is missing. Network idleness alone may not mean the app is ready. Wait for the relevant selector or application-ready signal before taking the screenshot.
- An element screenshot throws. The selected element may have been removed or replaced during rendering. Wait for the current element to appear and take its screenshot before the app changes it.
- The browser process remains open after an error. Put navigation and capture inside a
tryblock and close the browser infinally, as in the main example.
Browser configuration and output
Puppeteer’s page.screenshot() returns image bytes as a Uint8Array by default; requesting base64 encoding returns a string instead. A path option writes the screenshot to a file, which is convenient for scripts and test output.
Rank #4
- This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
- Dell Optiplex 3050 SFF Desktop computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD
- Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.
- Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
- Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.
Puppeteer documents headless: true as its new headless mode and 'shell' as old headless mode. Prefer Puppeteer’s bundled browser where possible: its documentation cautions that using a custom executablePath is outside the browser compatibility guarantee.
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 →Or skip the browser setup
For a publicly reachable page, ScreenshotNeo can return a screenshot or PDF from one GET request. It is a service, so a URL that only resolves on your own computer, such as http://localhost:3000, is not the same as a page your capture service can reach; use Puppeteer locally for a private development server.
Best Value
- Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections
- Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
- Storage: Combines 500GB SSD and 1TB HDD for ample storage space
- Graphics: Integrated Intel UHD Graphics 630 for crisp visuals and video playback
- Design: Sleek desktop tower with black color and slim profile for modern look
Install the requests package for the Python example. The request saves a WebP response as shot.webp. See the ScreenshotNeo API documentation for request options and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
- Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers report the page verdict and billing status.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. - The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000. Every feature is available on every plan.
Sign up for 1,000 free screenshots a month—no card required.
Frequently Asked Questions
Can Puppeteer save the screenshot as an in-memory value instead of a file?
Yes. Without a path, page.screenshot() returns image bytes as a Uint8Array by default; request base64 encoding if you need a string.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.

