当前位置:网站首页>When running selenium remotedriver, there is a problem with nativeconstructoraccessorimpl Newinstance0 bad sessionnotcreatedexception error
When running selenium remotedriver, there is a problem with nativeconstructoraccessorimpl Newinstance0 bad sessionnotcreatedexception error
2022-07-20 18:27:00 【Orange#】
Reprinted address :http://www.voidcn.com/article/p-ccdzafzn-bto.html
Error message :
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'RAJESHW10', ip: '169.254.3.253', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: driver.version: unknown
Command duration or timeout: 316 milliseconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
explain :
This error does give us a hint about the error , As shown below :
> Threads “main” The abnormal org.openqa.selenium.SessionNotCreatedException: Unable to create new service :ChromeDriverService: Unable to create new service :ChromeDriverService Indicates that a new session has not been started .
> Driver information :driver.version:unknown:driver.version:unknown Indicates that there is no call chromedriver Binary .
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method):sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), It comes from any of the following :
- java.lang.RuntimeException: Exception in constructor : The occurrence of this exception is unique to reflection . Usually , It is impossible to write code that ignores checked exceptions , Because it doesn't compile at all .
- java.lang.reflect.InvocationTargetException: If you throw InvocationTargetException, It means that the method is called . This exception does not indicate a problem with the reflection package or its usage .
- java.lang.IllegalArgumentException: If the constructor passes a parameter of the wrong type , Throw out IllegalArgumentException.
Conclusion :
From the above ponints Obviously ,Selenium-Java client ,JDK,ChromeDriver Binaries and Chrome The version of is not compatible .
The solution is as follows :
Update with the latest version JDK(JDK 8u152)> Update with the latest version Selenium-Java client (Selenium-Java v3.8.1)> Update with the latest version ChromeDriver Binary (ChromeDriver v2.34)> Update with the latest version ChromeDriver Binary (Chrome v63.0)
边栏推荐
猜你喜欢
PG的表和索引的膨胀(Table & Index Bloat)
Oracle数据库迁移,还担心执行计划改变吗?
vscode远程连接服务器,切换go版本
浏览器查看.md文件强烈推荐Markdown Viewer
After resetting the computer, install MySQL 5.7.38 and msvcp120 is missing dll
What are the technical characteristics of Lora?
【性能优化】MySQL性能优化之存储引擎调优
云图说丨数字资产链:您的数字资产产权保护神
教你使用CANN将照片一键转换成卡通风格
Dom——通过关系获取元素
随机推荐
SAP查询Open PO(未清采购订单)
离线底图瓦片,可用于Cesium加载使用
信标组的比赛路径设计
彻底搞懂offsetHeight,clientHeight,scrollHeight,scrollTop,offsetTop
Foundry tutorial: erc-20 token smart contract development from writing to deployment
Thoroughly understand offsetHeight, clientheight, scrollheight, scrolltop, offsettop
网络文件存储系统(三)fastdfs分布式文件系统实战
Dom——通过关系获取元素
食腐秃鹫还是啄木鸟?如何正确理解做空
Kotlin-Flow如何在Android项目中使用
#夏日挑战赛# HarmonyOS - 自定义组件之slider滑块
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(五)
国内开源的一款超好用 Redis 可视化工具,高颜值 UI,真香!!
隧道广播与无线集群通信广播系统-天台山隧道案例
关于完全模型组的相关问题的补充说明
Tiree Tree
数据库持久化+JDBC数据库连接
时习知新功能上线啦丨6月有这些新功能上线,你会用了吗?
压价、博弈、苦等,2022年VC/PE赶着排队退出
盒马“腰斩”,都怪侯毅话多?