首页 > 其他 > 详细

selenium3+firefox 报错

时间:2016-11-18 06:34:42      阅读:1390      评论:0      收藏:0      [点我收藏+]

The path to the driver executable must be set by the webdriver.gecko.driver system property

报这个错,是因为你使用了selenium3+Firefox。在selenium3中,使用Firefox,需要添加驱动。

 https://github.com/mozilla/geckodriver/releases/tag/v0.9.0 从此网站下载响应的驱动,解压到firefox安装目录

 

 

在代码中加入

 

System.setProperty("webdriver.firefox.marionette","C:\\Program Files (x86)\\Mozilla Firefox\\geckodriver.exe");
WebDriver driver=new FirefoxDriver();

 

C:\\Program Files (x86)\\Mozilla Firefox\\geckodriver.exe是驱动放置的位置

 

selenium3+firefox 报错

原文:http://www.cnblogs.com/zxchome/p/6076009.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!