Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Getgauge Taiko Chromium Browser

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Browser_Automation
Last Updated 2026-02-12 03:00 GMT

Overview

Bundled Chrome for Testing 140.0.7339.82 browser environment with CDP (Chrome DevTools Protocol) support across Linux, macOS, and Windows.

Description

Taiko bundles a specific version of Chrome for Testing that is automatically downloaded during `npm install`. The browser communicates with Taiko via the Chrome DevTools Protocol (CDP) over a WebSocket connection. The bundled version is pinned in `package.json` and updated on a bi-monthly schedule via an automated GitHub Actions workflow. Alternatively, users can point to a custom browser executable (including Firefox) via the `TAIKO_BROWSER_PATH` environment variable.

Usage

This environment is required for all browser automation performed by Taiko. Every `openBrowser()` call launches this Chromium instance (or the custom browser specified by `TAIKO_BROWSER_PATH`). It is the mandatory prerequisite for running any Taiko script, REPL session, or test suite.

System Requirements

Category Requirement Notes
Browser Chrome for Testing 140.0.7339.82 Auto-downloaded during npm install
Hardware x64 or ARM64 CPU ARM64 supported on macOS and Windows
Disk ~150MB extracted Downloaded as zip, extracted during install
Network Internet access during install Required for initial Chromium download only

Dependencies

Supported Platforms

  • `linux64` (Linux x86_64)
  • `mac-arm64` (macOS Apple Silicon)
  • `mac-x64` (macOS Intel)
  • `win32` (Windows 32-bit)
  • `win64` (Windows 64-bit)

System Packages (Linux)

  • `libnss3` (Network Security Services)
  • `libatk1.0-0` (Accessibility Toolkit)
  • `libatk-bridge2.0-0` (AT-SPI bridge)
  • `libxcomposite1` (X Composite extension)
  • `libcups2` (CUPS printing)
  • `libxrandr2` (X Resize and Rotate)
  • `libpangocairo-1.0-0` (Pango Cairo rendering)
  • `libgtk-3-0` (GTK+ 3 toolkit)
  • `libdrm-dev` (Direct Rendering Manager)
  • `libgbm-dev` (Generic Buffer Management)
  • `libasound-dev` (ALSA sound)

Credentials

No credentials required for the browser itself. The following environment variables control browser selection and behavior:

  • `TAIKO_BROWSER_PATH`: Override bundled Chromium with a custom browser executable path
  • `TAIKO_SKIP_CHROMIUM_DOWNLOAD`: Set to `true` to skip downloading bundled Chromium (use with `TAIKO_BROWSER_PATH`)
  • `NPM_CONFIG_TAIKO_SKIP_CHROMIUM_DOWNLOAD`: npm config variant of the skip flag

Quick Install

# Standard install (downloads Chromium automatically)
npm install taiko

# Use system Chrome instead
export TAIKO_SKIP_CHROMIUM_DOWNLOAD=true
export TAIKO_BROWSER_PATH=/usr/bin/google-chrome
npm install taiko

# Linux: Install required system libraries
sudo apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 \
  libxcomposite1 libcups2 libxrandr2 libpangocairo-1.0-0 \
  libgtk-3-0 libdrm-dev libgbm-dev libasound-dev

Code Evidence

Chromium version pinned in `package.json:42-44`:

"taiko": {
  "browser": {
    "version": "140.0.7339.82",
    "revision": "1496484",

Platform detection from `lib/browser/metadata.js:49-61`:

const platform = os.platform();
if (platform === "darwin") {
  this._platform = os.arch() === "arm64" ? "mac-arm64" : "mac-x64";
} else if (platform === "linux") {
  this._platform = "linux64";
} else if (platform === "win32") {
  this._platform = os.arch() === "x64" ? "win64" : "win32";
}

Browser path resolution from `lib/browser/browser.js:89`:

// Falls back to TAIKO_BROWSER_PATH env var if bundled Chromium not found

Headless mode configuration from `lib/browser/launcher.js:29-35`:

function setHeadlessArgs(args, options) {
  if (options.headless) {
    args.push("--headless");
    if (!args.some((arg) => arg.startsWith("--window-size"))) {
      args.push("--window-size=1440,900");
    }
  }
}

Common Errors

Error Message Cause Solution
`Failed to launch browser` Chromium not found or missing system libraries Run `ldd chrome` to find missing libraries; install via apt-get
`connect ECONNREFUSED 127.0.0.1` Browser crashed or failed to start CDP listener Check TAIKO_CRI_CONNECTION_RETRIES; increase if network is slow
`Navigation to url failed` Browser navigated but page errored Check SSL certificates; set `ignoreCertificateErrors: true`
`Chromium revision is not downloaded` Install script was skipped or failed Run `node lib/install.js` manually or re-run `npm install`

Compatibility Notes

  • Firefox (Experimental): Set `TAIKO_BROWSER_PATH` to Firefox executable. Highlighting is auto-disabled. Some features may not work due to CDP differences.
  • Headless Mode: Default window size is 1440x900 in headless. Override with `--window-size=W,H` via `TAIKO_BROWSER_ARGS`.
  • Docker: Requires `--no-sandbox` and `--disable-dev-shm-usage` flags. See Environment:Getgauge_Taiko_Docker_Container.
  • macOS: Executable path includes `.app/Contents/MacOS/Google Chrome for Testing`.
  • Windows: Archive naming changed at revision 591479 (from `chrome-win32` to `chrome-win`).

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment