I am getting this message all the time but in pom.xml I didn't use this library at all. It also says something wrong with Chromdriver and I can't understand what exactly wrong am I doing: 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. Can someone help me please?
CodePudding user response:
@ZarinaBakchieva I feel the message "Failed to load class "org.slf4j.impl.StaticLoggerBinder", you can look at this link SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"
For the other problem: "Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: " You can try and upgrade your chromedriver version. Sometimes your browser gets auto upgraded to the latest version while chromedriver becomes stale for this upgraded version.
For more details look at this - UnreachableBrowserException
CodePudding user response:
You have two errors here. The first error message...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
...implies that either you have a slf4j
dependency in your pom.xml
and the version is not compatible with the other binaries.
Solution
Upgrade slf4j
dependency to the latest stable SLF4J Simple Binding version using the following dependency:
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<scope>test</scope>
</dependency>
You can find a relevant detailed discussion in SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"