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

Copy Markdown View Source

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

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

Setup

mix wallabidi.install

Or for Docker/CI:

WALLABIDI_CHROME_URL=chrome:9222 mix test.chrome

Summary

Functions

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

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.

Functions

chrome()

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

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.