Skip to content

Commit 62fc6a9

Browse files
authored
Upgrade spring-boot version to 2.7.3 in examples (#5764)
`driver.findElementsByTagName()` is not available anymore in 2.7.3
1 parent 7044cde commit 62fc6a9

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

examples/selenium-container/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '2.6.4'
3+
id 'org.springframework.boot' version '2.7.3'
44
}
55
apply plugin: 'io.spring.dependency-management'
66

examples/selenium-container/src/test/java/SeleniumContainerTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
import org.junit.Rule;
33
import org.junit.Test;
44
import org.junit.runner.RunWith;
5+
import org.openqa.selenium.By;
56
import org.openqa.selenium.WebElement;
67
import org.openqa.selenium.chrome.ChromeOptions;
78
import org.openqa.selenium.remote.RemoteWebDriver;
89
import org.springframework.boot.test.context.SpringBootTest;
910
import org.springframework.boot.web.context.WebServerInitializedEvent;
10-
import org.springframework.boot.web.server.LocalServerPort;
11+
import org.springframework.boot.test.web.server.LocalServerPort;
1112
import org.springframework.context.ApplicationContextInitializer;
1213
import org.springframework.context.ApplicationListener;
1314
import org.springframework.context.ConfigurableApplicationContext;
@@ -43,7 +44,7 @@ public void simplePlainSeleniumTest() {
4344
RemoteWebDriver driver = chrome.getWebDriver();
4445

4546
driver.get("http://host.testcontainers.internal:" + port + "/foo.html");
46-
List<WebElement> hElement = driver.findElementsByTagName("h");
47+
List<WebElement> hElement = driver.findElements(By.tagName("h"));
4748

4849
assertThat(hElement).as("The h element is found").isNotEmpty();
4950
}

examples/spring-boot-kotlin-redis/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("org.springframework.boot") version "2.6.4"
2+
id("org.springframework.boot") version "2.7.3"
33
id("org.jetbrains.kotlin.jvm") version "1.7.10"
44
id("org.jetbrains.kotlin.plugin.spring") version "1.7.10"
55
}
@@ -25,4 +25,4 @@ compileKotlin {
2525
jvmTarget = "1.8"
2626
freeCompilerArgs = ["-Xjsr305=strict"]
2727
}
28-
}
28+
}

examples/spring-boot/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '2.6.4'
3+
id 'org.springframework.boot' version '2.7.3'
44
}
55
apply plugin: 'io.spring.dependency-management'
66

0 commit comments

Comments
 (0)