Visual Regression Testing Without Local Browsers: A 2026 API-First Approach
Before/after screenshots, CI/CD integration, and multi-device captures — all without installing Chromium, managing drivers, or paying for CI agents.
Visual regression testing — comparing screenshots of your app across versions to catch unintended UI changes — is typically done with Playwright or Selenium running locally. But that approach has a hidden cost: infrastructure overhead, browser driver management, long CI/CD cycles, and fragile selectors.
PageBolt's /sequence endpoint offers an alternative. One HTTP call captures before/after screenshots in a single browser session, no local browser required.
The Problem With Traditional Visual Regression Testing
Teams doing visual regression testing today use one of two approaches:
Approach 1: Manual screenshots + comparison tools
Developers take before/after screenshots manually, diff them with tools like Pixelmatch or Resemble.js. It works, but it's slow, error-prone, and doesn't integrate with CI/CD.
Approach 2: Playwright or Selenium + visual comparison library
You write test code that navigates the app, takes screenshots, and compares against a baseline. The catch:
- You manage Chromium installation and drivers
- Tests run locally or on CI agents, consuming CPU/memory
- Setup complexity increases with page interactions (authentication, dynamic content)
- Flaky selectors lead to false positives
Why API-Based Visual Regression Works Better
PageBolt's approach is different:
- One HTTP call, multiple outputs — navigate, interact, and capture both before and after screenshots in a single request
- No browser management — no Chromium, no driver headaches, no infrastructure
- Multi-step interactions — fill forms, click buttons, wait for content, then capture proof
- CI/CD ready — runs in GitHub Actions, GitLab CI, or any cloud pipeline in seconds
- Lightweight baseline storage — store before/after images as simple JSON blobs
Real-World Example: Capturing a Feature Change
Let's say you're testing a color theme change. Your app has a dark mode toggle. You need to capture before (light mode) and after (dark mode) screenshots of the same dashboard view.
With PageBolt's /sequence endpoint:
curl -X POST https://pagebolt.dev/api/v1/sequence \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"steps": [
{"action": "navigate", "url": "https://my-app.com/dashboard"},
{"action": "wait_for", "selector": ".dashboard-loaded", "timeout": 5000},
{"action": "screenshot", "name": "before-dark-mode", "fullPage": true},
{"action": "click", "selector": "[data-test-id=theme-toggle]"},
{"action": "wait", "ms": 500},
{"action": "screenshot", "name": "after-dark-mode", "fullPage": true}
],
"viewport": {"width": 1440, "height": 900},
"blockBanners": true
}'
Response:
{
"outputs": [
{
"name": "before-dark-mode",
"type": "screenshot",
"data": "iVBORw0KGgo...",
"size_bytes": 287654,
"duration_ms": 521
},
{
"name": "after-dark-mode",
"type": "screenshot",
"data": "iVBORw0KGgo...",
"size_bytes": 291234,
"duration_ms": 487
}
],
"total_duration_ms": 8234,
"usage": {"outputs_charged": 2}
}
Both screenshots captured in ~8 seconds, with full page capture enabled. No Chromium, no driver management.
GitHub Actions Integration Example
name: Visual Regression Tests
on: [push, pull_request]
jobs:
visual-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run visual regression test
run: |
curl -X POST https://pagebolt.dev/api/v1/sequence \
-H "x-api-key: ${{ secrets.PAGEBOLT_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"steps": [
{"action": "navigate", "url": "https://staging.my-app.com/dashboard"},
{"action": "wait_for", "selector": ".content-loaded", "timeout": 8000},
{"action": "screenshot", "name": "staging-dashboard", "fullPage": true}
],
"viewport": {"width": 1440, "height": 900},
"blockBanners": true,
"blockAds": true
}' \
-o test-output.json
- name: Compare against baseline
run: python3 scripts/compare_screenshots.py test-output.json baseline/
- name: Comment on PR with results
if: failure()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Visual regression detected. See artifacts.'
})
The workflow: one HTTP call to PageBolt, captures a full-page screenshot of staging, compares against baseline (stored in git), and comments on the PR if differences are found.
Cost: 1 API request = 1 screenshot. At PageBolt's pricing ($29–$199/month), you get 5,000–50,000 requests/month. For a CI/CD pipeline running visual tests 10× per day, that's $3–10/month. Compare to Playwright/Selenium infrastructure: $200–500/month for CI agents + storage + driver overhead.
Multi-Device Visual Regression
Capture the same view across desktop and mobile in one workflow:
# Desktop
curl -X POST https://pagebolt.dev/api/v1/sequence \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"steps": [{"action": "navigate", "url": "https://my-app.com/checkout"}, {"action": "screenshot", "name": "desktop-view"}], "viewport": {"width": 1440, "height": 900}}' \
> desktop.json
# iPhone 15 Pro Max
curl -X POST https://pagebolt.dev/api/v1/sequence \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"steps": [{"action": "navigate", "url": "https://my-app.com/checkout"}, {"action": "screenshot", "name": "mobile-view"}], "viewportDevice": "iphone_15_pro_max"}' \
> mobile.json
When to Use PageBolt vs Playwright
| Scenario | PageBolt | Playwright |
|---|---|---|
| Simple before/after comparison | ✓ | |
| Multi-step interaction capture | ✓ | ✓ |
| CI/CD visual regression | ✓ | |
| Complex test logic (assertions, loops) | ✓ | |
| Local debugging | ✓ | |
| No infrastructure overhead | ✓ | |
| Custom CSS/JavaScript injection | ✓ |
Getting Started
- Get an API key — Sign up free, get 100 requests/month
- Test the endpoint — Use the interactive playground at pagebolt.dev/dashboard
- Add to CI/CD — Copy the curl example above into your GitHub Actions, GitLab CI, or other workflow
- Store baselines — Commit before screenshots to your repo, compare new screenshots against them
- Integrate comparison logic — Use Pixelmatch, Resemble.js, or a custom diff tool to compare base64 image data
Visual regression testing doesn't require you to manage browsers. Try PageBolt free — 100 requests/month, no credit card.
Add visual regression testing to your CI/CD — free
100 requests/month, no credit card. Before/after screenshots in one API call, no browser to manage.
Get API key free →