maven webcollector java.lang.ClassNotFoundException: org.openqa.selenium.remote.SessionNotFoundException


使用webcollector时出现了如下异常

 

分析是依赖的问题,不仅要添加selenium-java,还要添加htmlunit-driver的依赖,注意不要添加成selenium-htmlunit-driver

 1      <!-- selenium -->  2 <dependency>  3 <groupId>org.seleniumhq.selenium</groupId>  4 <artifactId>selenium-java</artifactId>  5 <version>${selenium.version}</version>  6 </dependency>  7 <dependency>  8 <groupId>org.seleniumhq.selenium</groupId>  9 <artifactId>htmlunit-driver</artifactId> 10 <version>${htmlunit-driver.version}</version> 11 </dependency> 

添加htmlunit-driver后,异常解决

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM