Skip to content

feat(config): -Dbrowser switches the browser from the command line - #252

Merged
shossain786 merged 1 commit into
masterfrom
feat/browser-system-property
Nov 13, 2026
Merged

shossain786 merged 1 commit into
masterfrom
feat/browser-system-property

Conversation

@shossain786

@shossain786 shossain786 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

mvn test -Dbrowser=firefox used to be silently ignored (#247 removed the docs that claimed it worked). Now it works.

Behaviour

  • -Dbrowser=<name> or -Dselenium.boot.browser=<name>. The namespaced key wins if both are set.
  • Overrides browser.name from yml, profiles and SeleniumBootDefaults.
  • Clears browser.matrix, so asking for one browser runs only that browser.
  • Blank values are ignored; the value is trimmed and lower-cased.

Docs

  • configuration.md: new "Switching browser from the command line" section.
  • gradle.md: the snippets now forward browser and selenium.boot.profile. Before this, the documented ./gradlew test -Dselenium.boot.profile=firefox never reached the test JVM.

Verification

  • 6 new ConfigurationLoaderTest cases. On master, 5 fail (the blank-value case passes either way), and all pass with the change. mvn clean install is green.
  • End to end on selenium-boot-starter (yml says chrome), watching driver processes during mvn test -Dbrowser=firefox:
    • master: no geckodriver started (the property was ignored, so the yml chrome was used).
    • this branch: only geckodriver and Firefox ran, no chromedriver. 2/2 tests passed.
  • Docs build passes (only the existing junit-xml broken anchor remains).

🤖 Generated with Claude Code

-Dbrowser=firefox (or -Dselenium.boot.browser=firefox, which wins if both
are set) now replaces browser.name from the file, profiles and
SeleniumBootDefaults, and clears browser.matrix so one browser means one
browser. Blank is ignored; the value is trimmed and lower-cased.

Docs: new "Switching browser from the command line" section; the Gradle
snippets now forward browser and selenium.boot.profile (the latter was
documented but never forwarded, so it did nothing under Gradle).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shossain786
shossain786 merged commit 49314b1 into master Nov 13, 2026
2 checks passed
@shossain786
shossain786 deleted the feat/browser-system-property branch November 13, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant