To run Puppeteer screenshot tests in GitHub Actions, add Puppeteer to your project, install dependencies in a workflow on a GitHub-hosted runner, launch the page with a fixed viewport and state, and upload the resulting images as workflow artifacts. Your physical location in India does not require a different hosted workflow: the job runs on the runner you select. The example below is a starting point; adjust Node.js, commands, browser setup, and action versions to your project.
What the workflow needs
A repeatable screenshot job has four parts: a checked-out project, its Node.js dependencies, a compatible browser, and a test script that saves images. Puppeteer normally downloads a compatible Chrome for Testing browser when installed. If your package manager blocks install scripts, that download may not happen, and launch can fail because the browser is missing. See the Puppeteer installation guide.
As an Amazon Associate I earn from qualifying purchases.
Commit your package lockfile and use npm ci in CI so the workflow installs the dependency versions recorded in the project. The sample assumes the repository has a test:screenshots script and uses ubuntu-latest; change the Node version and command to match your project.
Recommended Free Tools
Add a screenshot test
For example, add a script such as scripts/screenshot.mjs. This writes a full-page PNG to artifacts/home.png. Replace the URL with a route your application serves during the test; if the application is not publicly reachable, start it in the workflow before running this script.
#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
import fs from 'node:fs/promises';
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1,
});
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.screenshot({ path: 'artifacts/home.png', fullPage: true });
} finally {
await browser.close();
}
Create the output directory before the script runs. In package.json, define the command:
{
"scripts": {
"test:screenshots": "mkdir -p artifacts && node scripts/screenshot.mjs"
}
}
The exact command for creating directories differs by shell and operating system. The example targets the Ubuntu runner shown below; use a cross-platform script if the same command must run on Windows or macOS. Puppeteer’s screenshots guide documents Page.screenshot() and its capture options.
Make the captured page state intentional
Choose a deterministic route and wait condition. networkidle0 waits for network activity to settle, but pages with long-lived requests may never reach that state. For those pages, wait for a selector that means the content is ready, or use an application-specific readiness signal. Fix the viewport and device scale factor; when rendering depends on them, also set locale, timezone, fonts, and relevant application data. These choices improve comparability but do not guarantee pixel-identical results across different browser or runner versions.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →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.
Configure GitHub Actions
Create .github/workflows/screenshots.yml. This workflow checks out the repository, configures Node, installs the lockfile dependencies, runs the screenshot script, and uploads the image even if the test step fails.
name: Screenshot tests
on:
push:
pull_request:
jobs:
screenshots:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Run screenshot test
run: npm run test:screenshots
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: artifacts/
if-no-files-found: warn
The Node version and action revisions are examples, not requirements: verify they match your project and current action guidance. Puppeteer’s own GitHub Actions workflow demonstrates browser caching, Linux execution using xvfb-run, and artifact upload. Adapt that pattern rather than copying its repository-specific commands or pins. GitHub documents installing additional software on hosted runners in its hosted-runner customization guide.
Browser installation and caching
Puppeteer’s normal package installation downloads a compatible Chrome for Testing build. If the browser is absent because installation scripts were disabled, use Puppeteer’s documented browser installation procedure or correct the package-manager configuration; do not assume that installing the npm package alone supplied a browser. Puppeteer stores browser files in $HOME/.cache/puppeteer by default. Caching that directory can reduce repeat downloads, but make sure the cache key accounts for the relevant Puppeteer/browser version so a cached binary remains compatible.
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.
Inspect screenshots and diagnose visual changes
After a workflow run, open its summary and download the screenshots artifact. The sample uses if: always(), so an image created before a later failure can still be available. If the script fails before creating any files, the artifact step warns that there were no files to upload.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesA raw screenshot artifact is useful for inspection, but it is not by itself a visual-diff test: the workflow above does not compare pixels against a baseline or decide whether a change is acceptable. Add a separate comparison step or service if your project needs automated visual regression checks.
India-specific considerations
The cited Puppeteer and GitHub materials do not establish a special configuration for developers located in India. The workflow executes on the GitHub-hosted runner specified by runs-on, rather than on the developer’s computer. If the rendered interface changes with locale or timezone, set those values deliberately in the browser or application and keep them consistent between runs; select the values that reflect the test case, not an assumed India-specific CI requirement.
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)
Troubleshooting
Puppeteer cannot find Chrome
The browser download may have been skipped when dependencies were installed. Check whether the package manager suppresses install scripts, then follow the browser installation instructions for the Puppeteer version in your lockfile. Confirm the browser cache path and avoid reusing a cache for an incompatible package/browser version.
Chrome exits immediately on Linux
Linux launch failures can result from missing system dependencies or display-related setup. Consult Puppeteer’s system requirements and troubleshooting guide. Puppeteer’s CI workflow uses xvfb-run for its Linux tests; whether you need that pattern depends on your launch mode and test setup.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Text is missing or wraps differently
Runner images may not contain the fonts your application expects. Install the fonts the page actually uses, then keep that environment consistent. Puppeteer notes that some character sets require additional fonts; see its troubleshooting material.
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 navigation wait never completes
A page that keeps connections open may not satisfy networkidle0. Wait for a meaningful selector or application readiness condition instead. If the page itself is slow or failing, inspect the workflow log and ensure the test route is reachable from the runner.
The artifact is missing
Check the script’s output path against the upload step’s path, and confirm the script reached the screenshot call. The sample stores files under artifacts/; changing one path requires changing the other.
Keep runs useful without making them brittle
- Use a committed lockfile and
npm cito make dependency installation follow the project lock. - Set viewport and device scale factor explicitly; control browser, fonts, locale, timezone, and page data when they affect what the image shows.
- Use a readiness signal appropriate to the page instead of relying on a network-idle condition that may not occur.
- Cache browser files only with a key that avoids incompatible versions, and retain artifacts so failures can be inspected.
- Review moving runner images, Node requirements, and GitHub Action versions periodically; the upstream workflow is an example, not a guarantee of pixel-identical rendering.
Or skip the browser setup
If you need a screenshot without managing Puppeteer and a browser binary in your own workflow, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return an image or PDF; the API also accepts parameter names used by other screenshot APIs.
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 →Example cURL request, using the documented API endpoint and parameter pattern:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Before capture, it can accept consent banners and remove 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, and response headers identify the page verdict and billing status. Its MCP server offers screenshot and PDF tools to AI agents. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
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.




