October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk7 min

How to Take Bulk Website Screenshots with GitLab CI

Use Playwright in GitLab CI to capture pages, shard Playwright Test suites across jobs, and store screenshots safely as artifacts.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture many website pages in GitLab CI, run a Playwright script that visits a URL list, saves each screenshot to a directory, and uploads that directory as a job artifact. If you use Playwright Test rather than a URL-loop script, GitLab can split the test suite across parallel jobs with Playwright’s --shard option. Those are two different designs: a plain URL list is not automatically distributed by Playwright Test sharding.

Choose how to divide the work

First decide whether your input is a list of URLs or a Playwright Test suite. A script is usually the direct fit for a simple URL list: it owns the list and visits each entry. Playwright Test sharding is for splitting work that the test runner recognizes as tests; it does not partition an arbitrary array of URLs for you.

As an Amazon Associate I earn from qualifying purchases.

  • One URL-list script: simplest setup and straightforward output naming. It runs as one job unless you explicitly partition the list yourself.
  • Sharded Playwright Test suite: useful when captures are already represented as tests and there are runners available to execute multiple jobs. GitLab supplies each job’s shard index and total.

Playwright’s CI guidance recommends one worker per CI job by default for stability and reproducibility. It describes sharding across jobs as the way to broaden parallelization; using more workers inside a job is an option for powerful self-hosted systems, not a universal setting.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture a URL list with Playwright

This minimal JavaScript script uses Playwright’s Chromium browser, reads URLs from urls.txt, and writes full-page PNG files beneath screenshots/. Each non-empty line in urls.txt should be a complete URL. The example is a starting point: choose viewport, page readiness, authentication, and screenshot behavior to suit the sites you capture.

#1 Best Overall

1. Add the files to your repository

Install Playwright as a project dependency and commit the lockfile so the CI install is reproducible. For example, initialize with npm init -y, then install playwright and save this script as capture.mjs.

import { chromium } from 'playwright';
import { mkdir, readFile } from 'node:fs/promises';
import { basename } from 'node:path';

const urls = (await readFile('urls.txt', 'utf8'))
  .split(/r?n/)
  .map(line => line.trim())
  .filter(line => line.length > 0);

await mkdir('screenshots', { recursive: true });
const browser = await chromium.launch({ headless: true });

try {
  const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
  for (const [index, url] of urls.entries()) {
    const response = await page.goto(url, { waitUntil: 'networkidle', timeout: 60000 });
    const name = `${String(index + 1).padStart(4, '0')}-${basename(new URL(url).pathname) || 'home'}`;
    const safeName = name.replace(/[^a-zA-Z0-9._-]/g, '_');
    await page.screenshot({ path: `screenshots/${safeName}.png`, fullPage: true });
    console.log(`${response?.status() ?? 'no response'} ${url} -> screenshots/${safeName}.png`);
  }
} finally {
  await browser.close();
}

The index prefix makes filenames unique even when URLs have the same final path segment. If runs must be comparable over time, replace the index-based name with a stable page identifier from your input data. If the target requires login, add a deliberate authentication method and protect any resulting screenshots as sensitive artifacts.

2. Run it in a GitLab job

GitLab’s and Playwright’s documented CI pattern uses a Playwright Docker image. This configuration follows that pattern and is illustrative; match the image tag to the Playwright package version you use, and check the current Playwright CI guidance because image tags change.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
stages:
  - capture

screenshots:
  stage: capture
  image: mcr.microsoft.com/playwright:v1.63.0-noble
  script:
    - npm ci
    - node capture.mjs
  artifacts:
    when: always
    paths:
      - screenshots/
    expire_in: 1 week

This assumes the project has a committed package-lock.json and the script creates screenshots/. The artifact path is relative to the job’s repository checkout. when: always and one-week retention are example choices, not universal defaults; GitLab’s default is to upload artifacts for successful jobs, and it also supports on_failure and always.

Rank #2
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

Shard a Playwright Test suite across GitLab jobs

If screenshots are generated by Playwright Test tests, GitLab can start multiple instances of the same job, while the shard arguments tell Playwright which portion of the suite each instance should run. Each shard must save distinct output names; otherwise separate jobs may create ambiguous files when artifacts are downloaded together.

stages:
  - capture

screenshots:
  stage: capture
  image: mcr.microsoft.com/playwright:v1.63.0-noble
  parallel: 4
  script:
    - npm ci
    - npx playwright test --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
  artifacts:
    when: always
    paths:
      - screenshots/
    expire_in: 1 week

In this configuration GitLab sets CI_NODE_INDEX and CI_NODE_TOTAL for the parallel instances. The Playwright Test suite must be set up to produce the screenshots, and the suite’s test cases—not a separate URL array—are what the shard option divides.

When browser projects also need separate jobs

Use parallel:matrix when you want job combinations such as browser projects and shard values. This creates combinations of declared variables; your script or Playwright configuration must consume those variables, and filenames should identify the relevant browser or project as well as the page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
screenshots:
  stage: capture
  image: mcr.microsoft.com/playwright:v1.63.0-noble
  parallel:
    matrix:
      - PROJECT: [chromium, firefox]
        SHARD: ['1/2', '2/2']
  script:
    - npm ci
    - npx playwright test --project=$PROJECT --shard=$SHARD
  artifacts:
    when: always
    paths:
      - screenshots/
    expire_in: 1 week

Each additional browser-project and shard combination adds another job, browser execution, and potential artifact output. Use this only when the extra coverage is worth the runtime, resource use, and storage.

Rank #3
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • 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.

Set parallelism to match runner capacity

GitLab’s current YAML reference documents parallel values from 1 through 200. That is a configuration range, not a throughput promise. Jobs need available runner concurrency; excess jobs can queue, and instance-level active-job limits can constrain pipeline execution.

  • Use enough parallel jobs to make use of available runners, without flooding the target site with requests.
  • Account for CPU, memory, browser processes, and any rate limits or access controls imposed by the pages being captured.
  • Start with Playwright’s one-worker-per-job CI default, then adjust only when runner resources and stability support it.
  • Expect total elapsed time to depend on queueing, page load behavior, and resource contention; no universal screenshot throughput is established by the documentation.

If you have only one available runner slot, adding parallel job instances may increase queue time rather than reduce the time until all captures finish.

Keep and secure the screenshot artifacts

Declare output directories under artifacts:paths to archive them. Choose expire_in based on how long the team needs the files; if omitted, the GitLab instance’s default applies. Later stages fetch earlier-stage artifacts by default, while dependencies and needs:artifacts let a pipeline control which outputs they fetch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitLab documents a default maximum final artifact archive size of 100 MB. This limit is for the final archive, not a stated per-image cap. If an archive approaches the effective limit, reduce capture dimensions or pages per shard, split output across archives, or ask an administrator about the configured project or instance limit.

Rank #4
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • 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.

Screenshots can expose account data, internal pages, or any content visible to the runner. Set artifact access deliberately with GitLab’s artifact access controls, and do not publish internal captures as a public Pages site without checking who can access them. GitLab notes that UI and API artifact controls do not necessarily prevent access through runner APIs using job tokens.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

  • No screenshots appear in the job artifact: confirm the script writes to the directory named in artifacts:paths, that the path is relative to the checkout, and that artifact upload is enabled for the job result you are investigating.
  • Some shard jobs produce no relevant captures: check that the command uses --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL and that the work is defined as Playwright Test tests. A standalone URL-list script needs its own partitioning logic.
  • Parallel outputs collide or are hard to identify: include a stable page identifier in filenames; for browser matrices, include the project or browser too. Separate GitLab jobs do not share a live filesystem, but similarly named files can be confusing when artifacts are retrieved together.
  • Jobs remain pending or take longer than expected: check runner availability and concurrency and any active-job limits. Increasing parallel does not create runner capacity.
  • Navigation times out or the image is incomplete: inspect the target’s load behavior and access requirements. The sample waits for networkidle, which may be unsuitable for pages with continuing network activity; select a readiness condition appropriate to the site and handle authentication or lazy-loaded content explicitly.
  • The artifact is too large: inspect the total archive, not just individual images, and reduce resolution or work per archive, or verify the effective GitLab size limit.

Or skip the browser setup

For a direct URL capture, ScreenshotNeo offers a one-request screenshot API. The request below saves a WebP image; see the ScreenshotNeo API documentation for request options and response behavior.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts and removes cookie or consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up free for ScreenshotNeo to get 1,000 screenshots a month with no card.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$245.99
Bestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$285.00

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.