Wallabidi.BrowserPaths (wallabidi v0.2.13)

Copy Markdown View Source

Finds Chrome and chromedriver — either local binaries to launch or remote URLs to connect to.

Resolution order

Chrome (CDP driver)

  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

Chromedriver (BiDi driver)

  1. WALLABIDI_CHROMEDRIVER_URL — connect to remote chromedriver (http://...)
  2. WALLABIDI_CHROMEDRIVER_PATH — local chromedriver binary to launch
  3. .browsers/PATHS file
  4. System PATH

Setup

mix wallabidi.install

Or for Docker/CI:

WALLABIDI_CHROME_URL=chrome:9222 mix test.chrome
WALLABIDI_CHROMEDRIVER_URL=http://chromedriver:9515/ mix test.chrome.bidi

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.

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

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

Returns the local chromedriver binary path or raises.

Returns the remote chromedriver 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.

chromedriver()

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

chromedriver_path()

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

chromedriver_path!()

Returns the local chromedriver binary path or raises.

chromedriver_url()

Returns the remote chromedriver URL or nil.