Upgrade selenium-java 4.15.0 → 4.46.0 (highest 4.x on Java 11) and unpin it from the Boot 2.6.3 BOM - #205
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
Override the Spring Boot 2.6.3 managed selenium.version (3.141.59) so the selenium modules resolve at 4.46.0 instead of splitting the classpath, and migrate the removed WebDriverWait(WebDriver, long) overload to Duration.
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
org.seleniumhq.selenium:selenium-java4.15.0 → 4.46.0, the highest 4.x line that still targets Java 11, and fixes the classpath split that made the previous "4.15.0" bump cosmetic.The interesting part is not the version string. On
main, the Spring Boot 2.6.3 BOM managesorg.seleniumhq.seleniumatselenium.version = 3.141.59, so every module thatselenium-javapulls in was silently forced back to Selenium 3:That is why
new WebDriverWait(driver, 10L)compiled — it was resolving against Selenium 3's API. Bumping the coordinate alone reproduces the same split, so this PR also overrides the managed property:With the override in place the whole family resolves at 4.46.0 for the first time, which surfaces the one real API break (
WebDriverWait(WebDriver, long)was removed in Selenium 4).Coordinate diff
org.seleniumhq.selenium:selenium-javaselenium-api/-support/-remote-driver/-chrome-driver/-edge-driver/-firefox-driver/-ie-driver/-safari-driver(transitive)ext['selenium.version']'4.46.0'No other dependency lines were touched (
webdrivermanager,testng,httpclient5,extentreportsunchanged);ext['selenium.version']only affectsorg.seleniumhq.seleniumartifacts.Why 4.46.0 (Java 11 ceiling check)
Requirement: highest 4.x that still runs on Java 11 (project is
sourceCompatibility = 11, CI is JDK 11, Spring Boot 2.6.3 ceiling).<release>inselenium-java/maven-metadata.xml(published 2026-07-11, >7 days old, not a pre-release). There is no Selenium 5.x.org.seleniumhq.seleniumjars (api, support, remote-driver, http, json, os, manager, chromium/chrome/edge/firefox/ie/safari drivers, devtools v148/v149/v150/latest, java) has class-file major version 55 = Java 11, ignoringMETA-INF/versions/. A scan of the entire 207-jartestRuntimeClasspathfound no class above major 55, so nothing on the classpath requires 17+.JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64, which succeeds — the strongest available proof of the Java 11 baseline.dependencyInsightevidence./gradlew dependencyInsight --configuration testRuntimeClasspath --dependency org.seleniumhq.selenium(unique resolved coordinates):Single version across the family, no conflict-resolution downgrade, no duplicate Selenium versions. The DGS platform's
{prefer 3.141.59}constraints now resolve up to 4.46.0 instead of pinning down. Nothing else ontestRuntimeClasspathdowngraded (HttpClient5 5.2.1, OkHttp/Netty transitives unchanged — Selenium 4.46 uses its ownselenium-http+ JDK HttpClient by default).API migration
One source change, exactly the API the new version removed:
WebDriverWait(WebDriver, long timeOutInSeconds)is a Selenium 3 overload, deprecated and removed in Selenium 4; theDurationconstructor replaces it.Everything else in
src/test/java/io/spring/selenium/**needed no changes:ChromeOptions,options.addArguments/setExperimentalOption,ChromeDriver/EdgeDriver/FirefoxDriver,driver.manage().window().maximize()/setSize(Dimension),TakesScreenshot,PageFactory, andExpectedConditionsare all unchanged in 4.46.0. NoDesiredCapabilitiesorgetSessionId()usages exist in this repo. Test assertions,@Disabledusage, and coverage/format thresholds were not touched.Also refreshed the stale Selenium row in
.agents/skills/java-engineering-excellence/SKILL.md(it still said 4.15.0) so it records the new version and theextoverride.Verification gate
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 ./gradlew clean test spotlessCheck -x jacocoTestCoverageVerificationmain, 3037fa5)spotlessCheckBoth numbers aggregated from
build/test-results/test/*.xml. Additionally,JAVA_HOME=... ./gradlew compileTestJavacompiles the Selenium sources cleanly (it failed withincompatible types: long cannot be converted to Durationbefore theBasePagemigration — the only breakage the upgrade caused)../gradlew spotlessApplywas run before committing../gradlew seleniumTestwas not run: it needs a live app on the configured base URL plus a real browser/driver, and it is excluded from thetestgate by design.Pre-existing on base, not addressed here
jacocoTestCoverageVerificationfails onmainat ~0.33 instruction coverage against the 0.80 rule inbuild.gradle. CI excludes it (./gradlew clean test -x jacocoTestCoverageVerification) and so does the gate above. Threshold not lowered, no coverage-padding tests added.mainbefore this PR; it is fixed here because the upgrade cannot be meaningful without it.Execution optimizations have been disabled for task ':spotlessJava'implicit-dependency warnings and Gradle 8 deprecation warnings onmainas well; unchanged by this PR.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/3f6f5574608b44d6bba81bb6b2b0b548
Requested by: @mbatchelor81