I use Chrom version 120 and selenium:
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.22.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.22.0</version>
</dependency>
I use JDK20
My test case failed:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: ‘DESKTOP-66NHD99’, ip: ‘192.168.1.17’
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:536)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:232)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:161)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:114)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:83)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:51)
at calculator.setup(calculator.java:34)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:390)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:325)
at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:663)
at org.testng.TestRunner.beforeRun(TestRunner.java:652)
at org.testng.TestRunner.run(TestRunner.java:614)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:443)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:437)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:397)
at org.testng.SuiteRunner.run(SuiteRunner.java:336)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1280)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1200)
at org.testng.TestNG.runSuites(TestNG.java:1114)
at org.testng.TestNG.run(TestNG.java:1082)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to bind the port.
Build info: version: ‘4.22.0’, revision: ‘c5f3146703*’
System info: os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘20.0.2’
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:249)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:117)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
… 28 more
===============================================
Default Suite
Total tests run: 0, Passes: 0, Failures: 0, Skips: 0
Configuration Failures: 1, Skips: 0
Process finished with exit code 0
Can you help me what vesion of selenium should I use?
Help with version capatibility
Iwona K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.