0

I'm facing an error in Selenium Java. I don't understand what this means. What does this error mean in Selenium Java?

יונ 26, 2023 11:22:49 AM org.openqa.selenium.remote.service.DriverService$Builder getLogOutput
INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Exception in thread "main" 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-LDB7RDR', ip: '192.168.181.1'
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_212'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}]}]
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:549)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:227)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:154)
    at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:107)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:87)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:50)
    at selenium.Selenium.main(Selenium.java:40)
Caused by: java.lang.IllegalStateException: Actual executable Unable to find executable for: C:\selenium\chrome
    at org.openqa.selenium.internal.Require$StateChecker.nonNull(Require.java:314)
    at org.openqa.selenium.os.OsProcess.<init>(OsProcess.java:65)
    at org.openqa.selenium.os.CommandLine.<init>(CommandLine.java:35)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:210)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:119)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:531)
    ... 7 more
C:\Users\שם לא ידוע\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 1 second)
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • What do you think does *Unable to find executable for: C:\selenium\chrome* mean? There is either no chrome driver installed or it is installed to a different path. That seems to be the root cause of the `SessionNotCreatedException`, which says *Possible causes are invalid address of the remote server or browser start-up failure*… – deHaar Jun 26 '23 at 08:41

1 Answers1

0

This error message...

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

...implies that Selenium driven ChromeDriver initiated _browsing context failed to open.


Root Cause

Considering Selenium version to be 4.10.0 the java.version 1.8.0_212 is too old and ancient.


Solution

Ensure that:

  • JDK is upgraded to current levels JDK 8u361.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352