Upgrade HtmlUnit and Selenium dependencies

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>
This commit is contained in:
jungh8n
2026-08-28 18:20:04 +02:00
committed by Brian Clozel
parent 491859b5ce
commit 09548c0874
6 changed files with 13 additions and 23 deletions
@@ -885,7 +885,7 @@ class HtmlUnitRequestBuilderTests {
private void assertSingleSessionCookie(String expected) {
org.htmlunit.util.Cookie jsessionidCookie = webClient.getCookieManager().getCookie("JSESSIONID");
org.htmlunit.http.Cookie jsessionidCookie = webClient.getCookieManager().getCookie("JSESSIONID");
if (expected == null || expected.contains("Expires=Thu, 01-Jan-1970 00:00:01 GMT")) {
assertThat(jsessionidCookie).isNull();
return;
@@ -25,7 +25,7 @@ import org.htmlunit.HttpMethod;
import org.htmlunit.WebClient;
import org.htmlunit.WebRequest;
import org.htmlunit.WebResponse;
import org.htmlunit.util.Cookie;
import org.htmlunit.http.Cookie;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Configuration;
@@ -17,7 +17,7 @@
package org.springframework.test.web.servlet.htmlunit.webdriver;
import jakarta.servlet.http.HttpServletRequest;
import org.htmlunit.util.Cookie;
import org.htmlunit.http.Cookie;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;