Upgrade to Selenium 4.1.1

Closes gh-29237
This commit is contained in:
Stephane Nicoll
2022-01-03 09:42:41 +01:00
parent 017d3dc402
commit a2bed160f0
4 changed files with 13 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -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.NoSuchWindowException;
import org.openqa.selenium.NoSuchSessionException;
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(NoSuchWindowException.class).isThrownBy(previousWebDriver::getWindowHandle);
assertThatExceptionOfType(NoSuchSessionException.class).isThrownBy(previousWebDriver::getWindowHandle);
assertThat(previousWebDriver).isNotNull().isNotSameAs(this.webDriver);
}