seleniumboot / seleniumboot/selenium-boot

Pin an exact browser version for local Chrome/Firefox runs

Open
#51 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Java
Stars
12
Forks
6
Avg merge
5h 48m
Merged PRs (30d)
18

Description

Problem

browserVersion exists today only for the cloud providers: BrowserStackProvider.buildOptions(...) (src/main/java/com/seleniumboot/driver/BrowserStackProvider.java:81-109) and SauceLabsProvider.buildOptions(...) (src/main/java/com/seleniumboot/driver/SauceLabsProvider.java:79-112) both call setBrowserVersion(browserVersion) on the ChromeOptions/FirefoxOptions/EdgeOptions/SafariOptions instance, sourced from execution.browserstack.browserVersion / execution.saucelabs.browserVersion in config. LocalChromeDriverProvider (src/main/java/com/seleniumboot/driver/LocalChromeDriverProvider.java) and LocalFirefoxDriverProvider (src/main/java/com/seleniumboot/driver/LocalFirefoxDriverProvider.java) build their ChromeOptions/FirefoxOptions with no version pin at all — they use whatever browser binary happens to be installed on the machine.

Why it matters

There's no config-driven way to pin a local run to an exact browser build, so a "passes on my laptop, fails in CI" divergence caused by a browser version mismatch can't be fixed from selenium-boot.yml today.

Proposed API
// SeleniumBootConfig.Browser — new field alongside name/headless/arguments (line ~71)
private String version;
public String getVersion() { return version; }
public void setVersion(String version) { this.version = version; }
browser:
  name: chrome
  version: "120.0.6099.109"   # passed through to Selenium Manager
// LocalChromeDriverProvider.createDriver(), after existing options setup
if (!isBlank(config.getBrowser().getVersion())) {
    options.setBrowserVersion(config.getBrowser().getVersion());
}
// LocalFirefoxDriverProvider.createDriver() — same, if FirefoxOptions supports it
Acceptance criteria
  • browser.version config key added to SeleniumBootConfig.Browser
  • LocalChromeDriverProvider passes it through via ChromeOptions.setBrowserVersion(...) (Selenium Manager resolves/downloads the matching binary)
  • Firefox equivalent added if FirefoxOptions supports an analogous version pin; otherwise document the limitation
  • Key is optional — omitting it preserves current "whatever's on the machine" behavior
  • Unit tests verifying the option is set only when browser.version is present
  • selenium-boot.yml reference docs updated with the new key

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SeleniumBootConfig.Browser and the existing createDriver methods in LocalChromeDriverProvider.java and LocalFirefoxDriverProvider.java, then compare the cloud provider option handling. Check the project's existing unit-test layout before adding coverage for present and absent browser.version values. Done means the optional key is documented in selenium-boot.yml, Chrome receives the version, and Firefox is supported or its limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.