seleniumboot / seleniumboot/selenium-boot
Pin an exact browser version for local Chrome/Firefox runs
Nobody has claimed this yet.
- 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.versionconfig key added toSeleniumBootConfig.Browser -
LocalChromeDriverProviderpasses it through viaChromeOptions.setBrowserVersion(...)(Selenium Manager resolves/downloads the matching binary) - Firefox equivalent added if
FirefoxOptionssupports 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.versionis present -
selenium-boot.ymlreference docs updated with the new key
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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