引入selenium-java依赖,发现到WebDriver driver = new ChromeDriver()
时报错
解决:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.0-jre</version>
</dependency>
查看网上资料后尝试引入guava依赖
启动后又报其他错误:NoClassDefFoundError: org/openqa/selenium/internal/Require
又尝试将selenium-java版本从4降到3:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
最后启动神奇的解决了
记录一下