Upgrade to Selenium HtmlUnit 3.64.0 and Selenium 4.4.0
Closes gh-32372 Closes gh-32373
This commit is contained in:
@@ -1329,7 +1329,7 @@ bom {
|
||||
]
|
||||
}
|
||||
}
|
||||
library("Selenium", "4.2.2") {
|
||||
library("Selenium", "4.4.0") {
|
||||
group("org.seleniumhq.selenium") {
|
||||
modules = [
|
||||
"selenium-api",
|
||||
@@ -1345,7 +1345,7 @@ bom {
|
||||
]
|
||||
}
|
||||
}
|
||||
library("Selenium HtmlUnit", "3.62.0") {
|
||||
library("Selenium HtmlUnit", "3.64.0") {
|
||||
group("org.seleniumhq.selenium") {
|
||||
modules = [
|
||||
"htmlunit-driver"
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.NoSuchSessionException;
|
||||
import org.openqa.selenium.NoSuchWindowException;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
@@ -59,7 +59,7 @@ class WebMvcTestWebDriverIntegrationTests {
|
||||
this.webDriver.get("/html");
|
||||
WebElement element = this.webDriver.findElement(By.tagName("body"));
|
||||
assertThat(element.getText()).isEqualTo("Hello");
|
||||
assertThatExceptionOfType(NoSuchSessionException.class).isThrownBy(previousWebDriver::getWindowHandle);
|
||||
assertThatExceptionOfType(NoSuchWindowException.class).isThrownBy(previousWebDriver::getWindowHandle);
|
||||
assertThat(previousWebDriver).isNotNull().isNotSameAs(this.webDriver);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.boot.test.web.htmlunit.webdriver;
|
||||
import java.net.URL;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.BrowserVersion;
|
||||
import com.gargoylesoftware.htmlunit.TopLevelWindow;
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.WebClientOptions;
|
||||
import com.gargoylesoftware.htmlunit.WebConsole;
|
||||
@@ -35,8 +36,8 @@ import org.springframework.core.env.Environment;
|
||||
import org.springframework.mock.env.MockEnvironment;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.argThat;
|
||||
import static org.mockito.ArgumentMatchers.isNull;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.BDDMockito.then;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -94,7 +95,8 @@ class LocalHostWebConnectionHtmlUnitDriverTests {
|
||||
MockEnvironment environment = new MockEnvironment();
|
||||
LocalHostWebConnectionHtmlUnitDriver driver = new TestLocalHostWebConnectionHtmlUnitDriver(environment);
|
||||
driver.get("/test");
|
||||
then(this.webClient).should().getPage(isNull(), requestToUrl(new URL("http://localhost:8080/test")));
|
||||
then(this.webClient).should().getPage(any(TopLevelWindow.class),
|
||||
requestToUrl(new URL("http://localhost:8080/test")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -103,7 +105,8 @@ class LocalHostWebConnectionHtmlUnitDriverTests {
|
||||
environment.setProperty("local.server.port", "8181");
|
||||
LocalHostWebConnectionHtmlUnitDriver driver = new TestLocalHostWebConnectionHtmlUnitDriver(environment);
|
||||
driver.get("/test");
|
||||
then(this.webClient).should().getPage(isNull(), requestToUrl(new URL("http://localhost:8181/test")));
|
||||
then(this.webClient).should().getPage(any(TopLevelWindow.class),
|
||||
requestToUrl(new URL("http://localhost:8181/test")));
|
||||
}
|
||||
|
||||
private WebRequest requestToUrl(URL url) {
|
||||
|
||||
Reference in New Issue
Block a user