The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →To screenshot a website through a proxy with Puppeteer, configure the proxy on the browser when launching it, navigate to the target page, then capture it with page.screenshot(). Puppeteer exposes browser command-line arguments through launch({ args }); the proxy endpoint and any authentication settings must match your proxy provider and browser setup. The official Puppeteer documentation cited below explains the launch extension point and screenshot methods, but does not provide a verified proxy-flag or universal proxy-authentication recipe.
Set up the page capture
Install Puppeteer in a Node.js project, then use its browser launch options to pass any browser-specific proxy configuration. This example deliberately leaves the proxy argument out: Puppeteer’s documented args option is the place to pass additional browser command-line arguments, but the cited Puppeteer API does not specify the exact proxy flag or authenticate a proxy for you. Confirm the correct syntax and authentication method for your browser, proxy protocol, and provider before adding it.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
WatchGuard Firebox M295 High Availability Unit with 3 Year Standard Support - HA Device for... | $2,185.11 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
npm install puppeteer
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
// Add browser-specific proxy configuration to args after verifying
// the syntax for your browser and proxy provider.
args: []
});
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'website.png', fullPage: true });
} finally {
await browser.close();
}
})();
The try/finally ensures the browser is closed even if navigation or capture fails. Replace https://example.com with the page you want to capture. Add the verified proxy setting to the launch configuration before creating or navigating pages so the browser uses that configuration for the session. Puppeteer’s launch API documents args as additional command-line arguments passed to the browser instance: LaunchOptions.
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 minuteChoose the screenshot scope and output
Full page
Use fullPage: true to capture the rendered document beyond the initially visible viewport, as in the example. Pages that load content only after scrolling may require additional handling before capture; a full-page option alone does not guarantee every lazy-loaded asset has appeared.
#1 Best Overall
- High Availability (HA) redundant unit for resilient failover and uptime. Operates only as the secondary in an HA pair and must be paired with a primary WatchGuard Firebox of the same model for synchronization and failover. Not a standalone appliance.
- WatchGuard Firebox M295 High Availability Unit with 3 Year Standard Support License (WGM29501603) - The Firebox M295 combines enterprise-grade security with multi-gig connectivity, SD-WAN, TLS decryption, and proxy-based inspection in a compact rackmount design.
- Standard Support covers software updates and round-the-clock emergency help. Add a Basic or Total Security Suite to activate IPS, gateway antivirus, and web filtering so threats are blocked before they reach users.
- Standard Support provides reliable technical assistance and software updates for WatchGuard Firebox appliances. Offering 24x7 help for emergencies and business-hours support for routine needs, it ensures your network stays secure and operational.
- Interfaces and continuity: 4x 2.5Gb RJ45, 4x 1Gb RJ45, 2x 10Gb SFP+ with VLANs and link aggregation, plus RIP, OSPF, BGP, and high availability to keep sites online.
A specific element
For a component rather than the whole document, locate it and call ElementHandle.screenshot(). Puppeteer scrolls the element into view if needed.
const card = await page.$('.product-card');
if (!card) throw new Error('Could not find .product-card');
await card.screenshot({ path: 'product-card.png' });
A rectangular region
Pass a clip rectangle to page.screenshot() when you need a defined area of the page. The clip rectangle uses page coordinates and dimensions.
await page.screenshot({
path: 'region.png',
clip: { x: 20, y: 100, width: 800, height: 500 }
});
Format and quality
Set path to choose the output file and extension, and use the documented screenshot options for the image type and related controls. Quality applies to supported lossy image formats; it does not change PNG output. Puppeteer’s screenshot guide covers full-page, clipped, and element captures: Screenshots. Its API reference lists ScreenshotOptions: ScreenshotOptions.
Understand proxy configuration and authentication
The proxy is a browser-session concern, while page.screenshot() is the capture step. Configure routing at launch using the argument format supported by the selected browser and proxy. The Puppeteer sources cited here do not establish one proxy flag that works across all browsers, protocols, providers, or versions, so do not copy an unverified example into production.
Do not put proxy credentials directly in source code committed to version control. Use your deployment’s secret-management approach and check the provider’s instructions for credential placement and supported authentication. Puppeteer documents page.authenticate() for HTTP authentication, but that documentation alone does not confirm behavior for every proxy protocol or provider: Page.authenticate().
Likewise, the @puppeteer/browsers package documents respecting HTTP_PROXY, HTTPS_PROXY, and NO_PROXY when proxy-agent is installed for that package’s library and CLI. That behavior should not be assumed to route ordinary web-page traffic from a Puppeteer-launched browser: @puppeteer/browsers API.
Wait for a useful page state
The sample waits for networkidle2 before capture, which can suit pages that settle quickly. Some sites keep network requests open or load important content later, so a network-idle wait may be unsuitable. Choose a navigation wait condition that matches the page, or wait for a specific selector or known delay before taking the screenshot. If content is missing, inspect the page state and browser logs before increasing timeouts indiscriminately.
Troubleshoot common failures
- The browser launches but the target cannot be reached: verify the proxy endpoint, protocol, credentials, network access, and the browser-specific argument syntax. Puppeteer’s cited launch API does not validate those provider details for you.
- The target loads directly instead of through the proxy: confirm that the proxy configuration was applied to the browser launch. Do not rely on
HTTP_PROXYorHTTPS_PROXYalone for page traffic based on documentation scoped to the browser-management package and CLI. - Navigation times out: check whether the proxy is reachable and whether the page keeps connections open. Try a wait condition appropriate to the page, and distinguish a page that rendered useful content from one that never loaded.
- The screenshot is blank or incomplete: wait for the actual content selector, check for delayed or scroll-triggered assets, and verify that the page finished rendering before capture.
- Element capture fails: confirm that the selector matched an element. The sample throws an explicit error when
.product-cardis absent. - PNG looks unchanged after setting quality: quality controls do not apply to PNG; choose a supported lossy format if quality adjustment is required.
Or skip the browser setup
If you need an API rather than managing a Puppeteer browser and proxy configuration, ScreenshotNeo returns a screenshot or PDF from one GET request. Cookie and consent banners, newsletter popups, and chat widgets can be removed before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. An MCP server provides screenshot tools for AI agents, including Claude, Cursor, and other MCP clients.
For available request options, see the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo and start with 1,000 free screenshots a month, no card required.
Frequently Asked Questions
Which Puppeteer documentation version is referenced here?
The documentation search results cited for this article displayed Puppeteer version 25.12.0; check the linked pages for the current API.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.




