Skip to content

Upgrade HtmlUnit to 5 - #37194

Open
blackdurumi wants to merge 1 commit into
spring-projects:mainfrom
blackdurumi:fix/37075-htmlunit-5-upgrade
Open

Upgrade HtmlUnit to 5#37194
blackdurumi wants to merge 1 commit into
spring-projects:mainfrom
blackdurumi:fix/37075-htmlunit-5-upgrade

Conversation

@blackdurumi

Copy link
Copy Markdown

Fixes #37075

This updates Spring Test's HtmlUnit integration to HtmlUnit 5 and the compatible Selenium HtmlUnit driver release.

Changes:

  • Upgrade org.htmlunit:htmlunit to 5.4.0.
  • Upgrade htmlunit3-driver and selenium-java to 4.47.0.
  • Adapt Cookie imports and cookie construction to HtmlUnit 5's org.htmlunit.http.Cookie.
  • Keep the existing HtmlUnit MockMvc tests passing on the new API.

Tests:

  • JAVA_HOME=/opt/homebrew/opt/openjdk@25 ./gradlew build

HtmlUnit 5 moved its Cookie type to org.htmlunit.http, so
Spring Test's HtmlUnit integration now uses the new API.

Constraint: Keep HtmlUnit and htmlunit3-driver versions compatible.
Rejected: Upgrade HtmlUnit alone | driver requires HtmlUnit 5.4.0.
Confidence: high
Scope-risk: narrow
Directive: Keep HtmlUnit and the driver version aligned.
Tested: JAVA_HOME=/opt/homebrew/opt/openjdk@25 ./gradlew build
Not-tested: None
Signed-off-by: jungh8n <jh981113@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to HtmlUnit 5

2 participants