Capture

bl diff

Compare current state vs previous

Compare current state vs previous

Usage

bl diff [OPTIONS]
bl diff <command>

Options

OptionDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
--session <value>Run this command in the named session (env: BL_SESSION; default: "default")

Global options

OptionDescription
-v, --verboseEnable debug logging

bl diff map

Compare current page elements vs last map

Usage

bl diff map [OPTIONS]

Options

OptionDescription
--headlessHide browser window (visible by default)
--jsonOutput as JSON
--session <value>Run this command in the named session (env: BL_SESSION; default: "default")

Global options

OptionDescription
-v, --verboseEnable debug logging

Examples

bl map           # take initial snapshot
bl click @e3     # interact with page
bl diff map      # see what changed

bl diff snapshot

Compare current a11y snapshot vs the last snapshot

Usage

bl diff snapshot [OPTIONS]

Options

OptionDescription
--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)
--everythingInclude all nodes (generic containers, etc.)
--headlessHide browser window (visible by default)
--jsonOutput as JSON
--session <value>Run this command in the named session (env: BL_SESSION; default: "default")

Global options

OptionDescription
-v, --verboseEnable 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 file

bl diff screenshot

Compare a current screenshot against a baseline image

Usage

bl diff screenshot [OPTIONS]

Options

OptionDescription
--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-pageCapture the full page instead of just the viewport
--headlessHide browser window (visible by default)
--jsonOutput as JSON
--session <value>Run this command in the named session (env: BL_SESSION; default: "default")

Global options

OptionDescription
-v, --verboseEnable 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 image

bl diff url

Compare two pages by a11y snapshot (and optionally screenshot)

Usage

bl diff url <url1> <url2> [OPTIONS]

Arguments

ArgumentDescription
&lt;url1&gt;First URL (a bare host gets https:// prepended)
&lt;url2&gt;Second URL (the browser is left on this page)

Options

OptionDescription
--snapshotCompare a11y snapshots (the default; flag is for explicitness)
--screenshotAlso compare screenshots of the two pages
--full-pageCapture full-page screenshots (with --screenshot)
--selector <value>Scope both snapshots to a subtree (CSS selector)
--everythingInclude all nodes in the snapshots
--headlessHide browser window (visible by default)
--jsonOutput as JSON
--session <value>Run this command in the named session (env: BL_SESSION; default: "default")

Global options

OptionDescription
-v, --verboseEnable 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

On this page