Capture
bl diff
Compare current state vs previous
Compare current state vs previous
Usage
bl diff [OPTIONS]
bl diff <command>Options
| Option | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
--session <value> | Run this command in the named session (env: BL_SESSION; default: "default") |
Global options
| Option | Description |
|---|---|
-v, --verbose | Enable debug logging |
bl diff map
Compare current page elements vs last map
Usage
bl diff map [OPTIONS]Options
| Option | Description |
|---|---|
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
--session <value> | Run this command in the named session (env: BL_SESSION; default: "default") |
Global options
| Option | Description |
|---|---|
-v, --verbose | Enable debug logging |
Examples
bl map # take initial snapshot
bl click @e3 # interact with page
bl diff map # see what changedbl diff snapshot
Compare current a11y snapshot vs the last snapshot
Usage
bl diff snapshot [OPTIONS]Options
| Option | Description |
|---|---|
--baseline <value> | Diff against a saved snapshot file instead of the last snapshot |
--selector <value> | Scope the snapshot to a subtree (CSS selector or @ref) |
--everything | Include all nodes (generic containers, etc.) |
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
--session <value> | Run this command in the named session (env: BL_SESSION; default: "default") |
Global options
| Option | Description |
|---|---|
-v, --verbose | Enable debug logging |
Examples
bl a11y-tree
# Take the initial snapshot
bl diff snapshot
# See what changed since then
bl diff snapshot --baseline snap.txt
# Diff against a saved snapshot filebl diff screenshot
Compare a current screenshot against a baseline image
Usage
bl diff screenshot [OPTIONS]Options
| Option | Description |
|---|---|
--baseline <value> | Baseline PNG/JPEG image to compare against |
-o, --output <value> | Write a visual diff image (changed pixels in red; only written when pixels differ) |
--threshold <value> | Per-pixel color tolerance from 0 (exact) to 1 (default: 0.1) |
--full-page | Capture the full page instead of just the viewport |
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
--session <value> | Run this command in the named session (env: BL_SESSION; default: "default") |
Global options
| Option | Description |
|---|---|
-v, --verbose | Enable debug logging |
Examples
bl screenshot -o base.png
# Save a baseline screenshot first
bl diff screenshot --baseline base.png
# Compare the current page against it
bl diff screenshot --baseline base.png -o diff.png
# Also write a visual diff imagebl diff url
Compare two pages by a11y snapshot (and optionally screenshot)
Usage
bl diff url <url1> <url2> [OPTIONS]Arguments
| Argument | Description |
|---|---|
<url1> | First URL (a bare host gets https:// prepended) |
<url2> | Second URL (the browser is left on this page) |
Options
| Option | Description |
|---|---|
--snapshot | Compare a11y snapshots (the default; flag is for explicitness) |
--screenshot | Also compare screenshots of the two pages |
--full-page | Capture full-page screenshots (with --screenshot) |
--selector <value> | Scope both snapshots to a subtree (CSS selector) |
--everything | Include all nodes in the snapshots |
--headless | Hide browser window (visible by default) |
--json | Output as JSON |
--session <value> | Run this command in the named session (env: BL_SESSION; default: "default") |
Global options
| Option | Description |
|---|---|
-v, --verbose | Enable debug logging |
Examples
bl diff url example.com staging.example.com
# Snapshot-diff production vs staging
bl diff url v1.example.com v2.example.com --screenshot
# Also compare screenshots