Menu

Browser Version Management

Relevant source files

Purpose and Scope

This document describes the browser version management system in the docker-selenium project. It covers how browser versions are tracked, how images for specific browser versions are built and released, version tagging strategies, and backward compatibility testing. This system allows users to run Selenium tests against specific browser versions going back several releases.

For information about the main build and release pipeline, see Release Automation and Deployment. For browser installation and configuration within images, see Browser Node and Standalone Images.


Browser Version Matrix Files

The project maintains YAML matrix files that define supported browser versions and their configuration metadata.

Matrix File Structure

Sources: tests/build-backward-compatible/browser-matrix.yml tests/build-backward-compatible/firefox-matrix.yml tests/build-backward-compatible/selenium-matrix.yml

browser-matrix.yml

The browser-matrix.yml file maps major browser version numbers to specific package versions and platform availability:

Browser VersionChrome PackageFirefox PackageEdge PackageFirefox Platforms
141google-chrome-stable=141.0.7390.54-1141.0.3microsoft-edge-stable=141.0.3537.57-1linux/amd64,linux/arm64
140google-chrome-stable=140.0.7339.207-1140.0.4microsoft-edge-stable=140.0.3485.94-1linux/amd64,linux/arm64
95google-chrome-stable=95.0.4638.69-195.0.2microsoft-edge-stable=95.0.1020.40-1N/A

Each entry in the matrix contains:

  • CHROME_VERSION: Full Chrome/Chromium package name with version
  • FIREFOX_VERSION: Firefox version number
  • EDGE_VERSION: Full Edge package name with version (null for older versions)
  • FIREFOX_PLATFORMS: Comma-separated list of supported platforms (added for versions 126+)
  • FIREFOX_DOWNLOAD_URL: Direct download URL for ARM64 Firefox builds (for specific versions)

Sources: tests/build-backward-compatible/browser-matrix.yml1-207

selenium-matrix.yml

The selenium-matrix.yml file tracks Selenium Grid versions and their associated browser version support:

Empty browser arrays indicate all browser versions are supported. Non-empty arrays list specific supported browser major versions.

Sources: tests/build-backward-compatible/selenium-matrix.yml1-206


Release Workflows for Specific Browser Versions

Three parallel workflows enable building and releasing images for specific browser versions independent of the main release cycle.

Workflow Architecture

Sources: .github/workflows/release-chrome-versions.yml .github/workflows/release-firefox-versions.yml .github/workflows/release-edge-versions.yml

Workflow Configuration

Each release workflow accepts the following inputs:

ParameterDescriptionDefault
stableUse upstream stable Selenium buildtrue
reuse-baseReuse existing base image instead of rebuildingtrue
grid-versionSelenium Grid version (e.g., 4.28.1)Empty (fetches latest)
build-dateBuild date in YYYYMMDD format20251001
browser-nameBrowser to build (chrome, firefox, edge)Browser-specific
browser-versionsJSON array of browser versions to buildBrowser-specific list
push-imagePush images to Docker Hub after successful testsfalse
pr-changelogCreate pull request with changelogtrue

Sources: .github/workflows/release-chrome-versions.yml4-44 .github/workflows/release-firefox-versions.yml4-44 .github/workflows/release-edge-versions.yml4-44

Build Execution Process

The workflow executes the following steps for each browser version in the matrix:

  1. Environment Setup: Install Docker, configure containerd image store .github/workflows/release-chrome-versions.yml75-82

  2. Version Resolution: Determine Grid version if not provided .github/workflows/release-chrome-versions.yml100-109

  3. Matrix Update: Run make update_browser_versions_matrix to fetch latest version mappings .github/workflows/release-chrome-versions.yml122

  4. Image Build: Execute bootstrap.sh with parameters:

    .github/workflows/release-chrome-versions.yml123

  5. Testing: Run browser-specific test targets:

  6. Image Push: If push-image=true, push images with push flags:

    .github/workflows/release-chrome-versions.yml147-150

  7. Changelog: Upload changelog markdown files to artifacts .github/workflows/release-chrome-versions.yml152-157

Sources: .github/workflows/release-chrome-versions.yml69-157

Browser-Specific Defaults

Each workflow defines default browser version lists:

Chrome: Versions 95-140 (46 versions)

.github/workflows/release-chrome-versions.yml34

Firefox: Versions 98-142 (45 versions)

.github/workflows/release-firefox-versions.yml34

Edge: Versions 95, 114-140 (28 versions, gap from 96-113)

.github/workflows/release-edge-versions.yml34

Sources: .github/workflows/release-chrome-versions.yml34 .github/workflows/release-firefox-versions.yml34 .github/workflows/release-edge-versions.yml34


Version Tagging Strategy

Browser-specific images use a multi-level tagging strategy to support various use cases.

Image Tag Format

Tag Hierarchy:

  1. Latest Tag: selenium/node-chrome:latest - Points to most recent Grid version with latest Chrome
  2. Grid Version Tag: selenium/node-chrome:4.36.0 - Latest browser for specific Grid version
  3. Browser Version Tag: selenium/node-chrome:140.0 - Specific browser with latest Grid
  4. Browser + Build Date: selenium/node-chrome:140.0-20251001 - Specific browser/build combination
  5. Full Version Tag: selenium/node-chrome:4.36.0-140.0-20251001 - Complete version specification

Sources: .github/workflows/deploy.yml173-181

Tag Generation in Deploy Workflow

The main deploy.yml workflow generates and pushes browser-specific tags after building the standard release:

This target iterates through all browser nodes and standalone images, creating version-specific tags based on the browser metadata files.

Sources: .github/workflows/deploy.yml173-181

Image Naming Convention

Image TypeRepositoryTag Examples
Node Chromeselenium/node-chrome141.0, 141.0-20251001, 4.36.0-141.0-20251001
Node Firefoxselenium/node-firefox142.0, 142.0-20251001, 4.36.0-142.0-20251001
Node Edgeselenium/node-edge140.0, 140.0-20251001, 4.36.0-140.0-20251001
Standalone Chromeselenium/standalone-chrome141.0, 141.0-20251001, 4.36.0-141.0-20251001
Standalone Firefoxselenium/standalone-firefox142.0, 142.0-20251001, 4.36.0-142.0-20251001
Standalone Edgeselenium/standalone-edge140.0, 140.0-20251001, 4.36.0-140.0-20251001

Sources: .github/workflows/deploy.yml173-181


Backward Compatibility Testing

The bootstrap.sh script in tests/build-backward-compatible/ enables building and testing images with older browser versions against specific Selenium Grid versions.

bootstrap.sh Script Interface

Sources: .github/workflows/release-chrome-versions.yml115-150

Reuse Base Image Optimization

When REUSE_BASE=true (default), the script pulls and reuses an existing base image instead of rebuilding:

This optimization significantly reduces build time when only browser versions differ. The base image contains:

  • Java 21 runtime
  • Selenium server JAR
  • OpenTelemetry instrumentation
  • Supervisor process manager

Sources: .github/workflows/release-chrome-versions.yml11-25 .github/workflows/release-chrome-versions.yml128-129

Version-Specific Environment Variables

The script sets browser-specific environment variables before building:

These variables are consumed by Dockerfiles to install the correct browser versions.

Sources: tests/build-backward-compatible/browser-matrix.yml14-18


Integration with Main Build Pipeline

The main deploy.yml workflow integrates browser version management into the release process.

Build Pipeline Integration Points

Sources: .github/workflows/deploy.yml134-181

Update Browser Versions Matrix

The update_browser_versions_matrix target refreshes browser version metadata before tagging:

This target:

  1. Reads current browser-matrix.yml
  2. Queries package repositories for latest patch versions
  3. Updates matrix entries with current versions
  4. Commits changes if running in CI

Sources: .github/workflows/deploy.yml172

Tag and Push Browser Images

After the main release images are pushed, browser-specific tags are created and pushed:

This process:

  1. Inspects built images to extract browser versions
  2. Creates tags in format {BROWSER_VERSION}, {BROWSER_VERSION}-{BUILD_DATE}, {GRID_VERSION}-{BROWSER_VERSION}-{BUILD_DATE}
  3. Pushes all tags to Docker Hub
  4. Logs tag creation for audit

Sources: .github/workflows/deploy.yml173-181


Dev/Beta Channel Management

The update-dev-beta-browser-images.yml workflow maintains images with development and beta browser channels.

Dev/Beta Workflow Architecture

Sources: .github/workflows/update-dev-beta-browser-images.yml1-142

Dev/Beta Image Tags

Dev and beta images use channel names as tags:

BrowserDev TagBeta Tag
Chromeselenium/node-chrome:devselenium/node-chrome:beta
Firefoxselenium/node-firefox:devselenium/node-firefox:beta
Edgeselenium/node-edge:devselenium/node-edge:beta

Standalone variants follow the same pattern: selenium/standalone-{browser}:{channel}

Sources: .github/workflows/update-dev-beta-browser-images.yml29-37

Channel-Specific Build Targets

The Makefile contains targets for each browser/channel combination:

  • make chrome_dev, make chrome_beta
  • make firefox_dev, make firefox_beta
  • make edge_dev, make edge_beta
  • make standalone_chrome_dev, make standalone_chrome_beta
  • And so on for all browsers

These targets modify the browser installation commands in Dockerfiles to pull from dev/beta repositories instead of stable.

Sources: .github/workflows/update-dev-beta-browser-images.yml75-78


Helm Chart Integration

The Helm chart supports deploying multiple browser versions simultaneously with version-specific autoscaling.

Multiple Browser Version Configuration

The multiple-nodes-platform-version.yaml file provides a reference configuration for deploying multiple Chrome, Firefox, and Edge versions:

Sources: charts/selenium-grid/multiple-nodes-platform-version.yaml9-46

Version-Based Autoscaling Configuration

Sources: charts/selenium-grid/multiple-nodes-platform-version.yaml1-235

Browser Version Matching in KEDA

KEDA autoscaling triggers match incoming requests to specific browser versions using metadata:

This configuration creates a ScaledObject that only scales when:

  1. browserName capability matches (Chrome)
  2. browserVersion capability is 140.0 (or unset for empty string match)
  3. platformName capability is Linux

Empty browserVersion: '' matches requests without explicit version requirements, routing them to the latest browser.

Sources: charts/selenium-grid/multiple-nodes-platform-version.yaml12-25

Full Browser Version Matrix in Helm

The configuration file contains complete version matrices:

Each browser version deployment can scale independently based on demand for that specific version.

Sources: charts/selenium-grid/multiple-nodes-platform-version.yaml1-689