> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/browser-tools

Install a variety of browsers and tools for browser testing. Includes Chrome, Chrome for Testing, ChromeDriver, Edge, Firefox and geckodriver.


## Commands

### install_browser_tools

Install various browsers and browser-testing tools into any Debian/Ubuntu-based Docker image. Intended to ease browser testing on CircleCI. Requirements: bash, curl, apt-get, gpg, sha256sum, sed, tar, unzip, grep


| Parameter | Type | Default | Description |
|---|---|---|---|
| `chrome_for_testing_driver_install_dir` | string | /usr/local/bin | Directory in which to install ChromeDriver. If installing ChromeDriver as well, use a different directory for each.
 |
| `chrome_for_testing_version` | string | latest | Version of Chrome for Testing to install, defaults to the latest stable release.
 |
| `chrome_version` | string | latest | Version of Chrome to install, defaults to the latest stable release. To install an older release, specify a full chrome version number, e.g., 147.0.7727.55 Only supported on CentOS and Debian
 |
| `chromedriver_install_dir` | string | /usr/local/bin | Directory in which to install ChromeDriver. If installing Chrome Testing Driver as well, use a different directory for each.
 |
| `edge_driver_dir` | string | /usr/local/bin | Directory in which to install Edge WebDriver
 |
| `edge_version` | string | latest | Version of Edge to install, defaults to the latest stable release. This param only works for Ubuntu/Debian version, macOS will always install latest version. |
| `firefox_install_dir` | string | /usr/local/bin | Directory in which to install Firefox
 |
| `firefox_version` | string | latest | Version of Firefox to install, defaults to the latest stable release. To install an older release, specify a full semantic version number, e.g., 149.0, 149.0.2, 140.9.1esr, etc.
 |
| `geckodriver_install_dir` | string | /usr/local/bin | Directory in which to install geckodriver
 |
| `geckodriver_version` | string | latest | Version of geckodriver to install, defaults to latest release. To install an older release, specify a full semantic version tag, e.g., `v0.36.0`. For a list of releases, and a Firefox/Geckodriver version compatibility table, see the following links: https://github.com/mozilla/geckodriver/releases https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
 |
| `install_chrome` | boolean | true | Install Google Chrome? Note: only the latest stable release can be installed, as Google does not maintain a public archive of previous releases.
 |
| `install_chrome_for_testing` | boolean | false | Install Chrome for Testing? |
| `install_chrome_for_testing_driver` | boolean | false | Install Chrome for Testing with driver? |
| `install_chromedriver` | boolean | true | Install ChromeDriver? Note: requires Google Chrome. A ChromeDriver version will be dynamically selected based on the installed version of Chrome; for details, see the following information: https://sites.google.com/a/chromium.org/chromedriver/downloads/version-selection
 |
| `install_edge` | boolean | false | Install Microsoft Edge? |
| `install_edge-web-driver` | boolean | false | Install Microsoft Edge Web Driver? |
| `install_firefox` | boolean | true | Install Firefox? |
| `install_geckodriver` | boolean | true | Install Geckodriver? |
| `replace_existing_chrome` | boolean | false | If there is an existing installation of Google Chrome, replace it with the latest stable release
 |

### install_chrome

Install Google's Chrome browser, for use in browser testing. Note: only the latest stable release can be installed, as Google does not maintain a public archive of previous releases. Supports Debian/Ubuntu Linux, Alpine Linux (via Chromium), and macOS environments.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `cache_key` | string | v1 | Cache key to save Chrome.
Defaults to v1.
 |
| `channel` | enum | stable | The release channel of Google Chrome to use. Defaults to 'stable'.
 |
| `chrome_version` | string | latest | Version of Chrome to install, defaults to the latest stable release. To install an older release, specify a full Chrome version number, e.g., 147.0.7727.55 Only supported on CentOS and Debian If replace_existing is false, this version is ignored.
 |
| `replace_existing` | boolean | false | If there is an existing installation of Google Chrome, replace it with the latest stable release?
 |
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |
| `use_cache` | boolean | false | Install Chrome using a cached version.
Using this option will increase costs and does not improve times considerable, use only if having problems with download.
Defaults to false.
 |

### install_chrome_for_testing

Install Chrome for Testing and its driver into the specified directory. For more information about Chrome for Testing: https://developer.chrome.com/blog/chrome-for-testing/


| Parameter | Type | Default | Description |
|---|---|---|---|
| `install_chromedriver` | boolean | true | Whether or not to install Chrome for Testing ChromeDriver alongside Chrome for Testing
 |
| `install_dir` | string | /usr/local/bin | Directory in which to download and install Chrome and the driver.
 |
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |
| `version` | string | latest | Which version to install. If none provided, the latest available will be installed.
 |

### install_chromedriver

Install Google's ChromeDriver WebDriver proxy, for use in browser testing with Chrome. A ChromeDriver version will be dynamically selected based on the installed version of Chrome; for details, see https://sites.google.com/a/chromium.org/chromedriver/downloads/version-selection Requirements: sed, curl, unzip


| Parameter | Type | Default | Description |
|---|---|---|---|
| `install_dir` | string | /usr/local/bin | Directory in which to install ChromeDriver (directory selection not supported on Alpine Linux)
 |
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |

### install_edge

Install Edge browser, for use in browser testing. Supports Linux (Debian/Ubuntu) amd64 and macOS environments. There is not an Edge version of Edge for Linux ARM. For macOS brew is required.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |
| `version` | string | latest | Version of Edge to install, defaults to the latest stable release. This param only works for Ubuntu/Debian version, macOS will always install latest version.
 |

### install_edge_driver

Install Edge WebDriver, for use in browser testing with Chrome. Edge must be installed first to select the right version to install.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `install_dir` | string | /usr/local/bin | Directory in which to install Edge WebDriver
 |
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |

### install_firefox

Install Mozilla's Firefox browser, for use in browser testing. Requires apt-get, gpg, curl, sha256sum, tar, jq


| Parameter | Type | Default | Description |
|---|---|---|---|
| `cache_key` | string | v1 | Cache key to save Firefox.
Defaults to v1.
 |
| `install_dir` | string | /usr/local/bin | Directory in which to install Firefox
 |
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |
| `use_cache` | boolean | false | Install Firefox using a cached version of the installer.
Using this option will increase costs and does not considerably improve times, use only if having problems with download.
Cache won't be used when version is set to latest.
Defaults to false.
 |
| `version` | string | latest | Version of Firefox to install, defaults to the latest stable release. To install an older release, specify a full semantic version number, ESR or otherwise, e.g., 149.0, 149.0.2, 140.9.1esr, etc.
 |

### install_geckodriver

Install Mozilla's geckodriver WebDriver proxy, for use in browser testing with Firefox. Requirements: curl, tar


| Parameter | Type | Default | Description |
|---|---|---|---|
| `install_dir` | string | /usr/local/bin | Directory in which to install geckodriver
 |
| `timeout` | string | 10m | Maximum time to allow without output before failing the step. Passed to CircleCI's no_output_timeout.
 |
| `version` | string | latest | Version of geckodriver to install, defaults to latest release. To install an older release, specify a full semantic version tag, e.g., `v0.36.0`. For a list of releases, and a Firefox/geckodriver version compatibility table, see the following links: https://github.com/mozilla/geckodriver/releases https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
 |

## Examples

### install_browsers

Install default browsers and browser drivers. Includes Chrome, ChromeDriver, Firefox and geckodriver. Use the node variant


```yaml
version: '2.1'
orbs:
  browser-tools: circleci/browser-tools@x.y
jobs:
  test:
    docker:
      - image: cimg/node:lts-browsers
    steps:
      - browser-tools/install_browser_tools
workflows: null
```

### install_chrome

Install Google's Chrome browser and ChromeDriver in the node variant image


```yaml
version: '2.1'
orbs:
  browser-tools: circleci/browser-tools@x.y
jobs:
  test:
    docker:
      - image: cimg/node:lts-browsers
    steps:
      - browser-tools/install_chrome:
          timeout: 5m
      - browser-tools/install_chromedriver:
          timeout: 5m
      - run:
          command: |
            google-chrome --version
            chromedriver --version
          name: Check install
workflows: null
```

### install_versioned_browsers

Install specific versions of Firefox and Chrome in the base variant image.


```yaml
version: '2.1'
orbs:
  browser-tools: circleci/browser-tools@x.y
jobs:
  test:
    executor: browser-tools/default
    steps:
      - browser-tools/install_browser_tools:
          chrome_version: 147.0.7727.55
          firefox_version: 149.0.2
      - run:
          command: |
            google-chrome --version
            firefox --version
            geckodriver --version
            chromedriver --version
            java -jar /usr/local/bin/selenium.jar --version
          name: Check install
workflows: null
```