Wallabidi.BrowserPaths (wallabidi v0.4.0-rc.8)

Copy Markdown View Source

Finds browser binaries — either a local binary to launch or a remote URL to connect to.

Chrome resolution order

  1. WALLABIDI_CHROME_URL — connect to remote Chrome (chrome:9222 or full ws:// URL)
  2. WALLABIDI_CHROME_PATH — local Chrome binary to launch
  3. .browsers/PATHS file (written by mix wallabidi.install)
  4. System PATH

Lightpanda resolution order

  1. WALLABIDI_LIGHTPANDA_PATH — local Lightpanda binary to launch
  2. .browsers/PATHS file (written by mix wallabidi.install)

Lightpanda has no remote-URL mode here: the lightpanda package manages the binary and spawns it locally. When neither source resolves, the lightpanda package falls back to its own Lightpanda.bin_path/0 (the version-stamped .browsers/lightpanda/ dir, or _build/).

Setup

mix wallabidi.install

Or for Docker/CI:

WALLABIDI_CHROME_URL=chrome:9222 mix test.chrome
WALLABIDI_LIGHTPANDA_PATH=/opt/lightpanda/lightpanda mix test.lightpanda

Summary

Functions

Returns {:url, url} for remote, {:path, path} for local, or :error.

True on platforms Chrome for Testing has no build for — currently arm64/aarch64 Linux. On these, mix wallabidi.install can't download Chrome and a system Chromium must be used instead.

Returns {:ok, path} for local Chrome, or :error. Ignores URLs.

Returns the local Chrome binary path or raises.

Returns the remote Chrome URL or nil.

Returns {:path, path} for a resolved Lightpanda binary, or :error.

Returns the directory Lightpanda should install into, version-stamped to mirror Chrome for Testing's .browsers/chrome/<target>-<version>/ layout — e.g. .browsers/lightpanda/aarch64-macos-fork-2026-05-30.

Returns {:ok, path} for a resolved Lightpanda binary, or :error.

Returns the path to a Chrome/Chromium binary already on the system PATH (google-chrome, chromium, or chromium-browser), or nil.

Functions

chrome()

Returns {:url, url} for remote, {:path, path} for local, or :error.

chrome_for_testing_unsupported?()

True on platforms Chrome for Testing has no build for — currently arm64/aarch64 Linux. On these, mix wallabidi.install can't download Chrome and a system Chromium must be used instead.

chrome_path()

Returns {:ok, path} for local Chrome, or :error. Ignores URLs.

chrome_path!()

Returns the local Chrome binary path or raises.

chrome_url()

Returns the remote Chrome URL or nil.

lightpanda()

Returns {:path, path} for a resolved Lightpanda binary, or :error.

Unlike chrome/0 there is no remote-URL mode — the lightpanda package launches the binary locally.

lightpanda_install_dir()

Returns the directory Lightpanda should install into, version-stamped to mirror Chrome for Testing's .browsers/chrome/<target>-<version>/ layout — e.g. .browsers/lightpanda/aarch64-macos-fork-2026-05-30.

Used both by mix wallabidi.install (to place the binary) and by the test config (to point config :lightpanda, :install_dir at the same spot so the runtime resolves it). Returns nil if the lightpanda package is unavailable or too old to expose target/0 + release/0.

lightpanda_path()

Returns {:ok, path} for a resolved Lightpanda binary, or :error.

system_chrome()

Returns the path to a Chrome/Chromium binary already on the system PATH (google-chrome, chromium, or chromium-browser), or nil.

Used by the installer to skip the Chrome for Testing download when a usable browser is already present.