admin管理员组文章数量:1402795
I am trying to run a simple Selenide test using Selenium 4.14.1
, but I keep getting this error when launching Chrome:
Exception in thread "main" .openqa.selenium.SessionNotCreatedException: Could not start a new session.
Possible causes are invalid address of the remote server or browser start-up failure.
Caused by: java.lang.NoSuchMethodError: 'void com.googlemon.base.Throwables.throwIfUnchecked(java.lang.Throwable)'
Setup Details:
OS: Windows 11
Java: 17.0.10
Selenium: 4.14.1
Selenide: 7.6.0
ChromeDriver: Managed via WebDriverManager
<!-- Explicitly include Guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.0-jre</version>
</dependency>
<!-- WebDriverManager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.9.2</version>
</dependency>
<!-- Selenide -->
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>7.6.0</version>
</dependency>
<!-- Selenium -->
<dependency>
<groupId>.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</dependency>
<dependency>
<groupId>.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>3.0.12</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>
Troubleshooting Steps Tried: Checked for conflicting dependencies using mvn dependency:tree | grep guava
Explicitly added Guava 32.0.0-jre (latest at the time)
Verified WebDriver setup (WebDriverManager automatically downloads the correct ChromeDriver version)
Tried running with a clean Maven build using mvn clean install
Tried excluding Guava from transitive dependencies
Despite these fixes, the error still occurs.
Question:
Could this be due to an indirect dependency conflict (e.g., groovy-all)?
Should I explicitly exclude older Guava versions from groovy-all or another library?
Is this related to Selenide 7.6.0 and Selenium 4.14.1 compatibility?
Any help would be greatly appreciated!
版权声明:本文标题:java - Selenide + Selenium: NoSuchMethodError in Throwables.throwIfUnchecked() when launching Chrome - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744343662a2601628.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论