博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
selenium chrome driver和 IE driver 常见问题(1)
阅读量:6913 次
发布时间:2019-06-27

本文共 1241 字,大约阅读时间需要 4 分钟。

hot3.png

103845_jgrB_855532.png

The path to the driver executable must be set by the webdriver.ie.driver system property的问题

1.The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see . The latest version can be downloaded from  

该问题的错误原因和上面的一样,用IEdriver的时候也需要装插件,去 下载对应的插件版本,然后修改代码如下:

  1. File file = new File("C:/Selenium/iexploredriver.exe");  

  2. System.setProperty("webdriver.ie.driver", file.getAbsolutePath());  

  3. WebDriver driver = new InternetExplorerDriver(); 

  4. 参考来源:

2、Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see. The latest version can be downloaded from

 at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
 at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:105)
 at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:75)
 at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
 at com.example.tests.Selenium2ForChrome.main(Selenium2ForChrome.java:18)

出现这个错误的原因是因为谷歌浏览器和selenium不是原生的,需要在谷哥里面装插件,插件下载地址是。

暂时还没解决好。

转载于:https://my.oschina.net/CeShiXiaoSongShu/blog/346219

你可能感兴趣的文章
GIS(四)——为js版搜狗地图添加边界+Marker和Brand的最终美化版
查看>>
AWS - VPC site-to-site ×××
查看>>
Spring Cloud Alibaba使用Sentinel限流_四
查看>>
Redisbook学习笔记(1)sds
查看>>
12.6-全栈Java笔记:Java网络编程(四)
查看>>
Django加载模板文件
查看>>
我的友情链接
查看>>
windowsserver2008取消显示关机原因
查看>>
axis2学习——axis2的安装
查看>>
Elasticsearch学习笔记5: suggest实现搜索补全
查看>>
我的友情链接
查看>>
关于IIC和SPI总线
查看>>
在 Windows 8 中手动安装语言包
查看>>
判断jdk 是64位还是32位
查看>>
javaMD5加密
查看>>
读取sd卡上的外部数据库导入到app的数据库进行读取数据
查看>>
jQuery --(1)hello world
查看>>
docker--(5)仓库
查看>>
JavaScript 模块化编程随堂笔记
查看>>
Python结构化编程
查看>>