watir-webdriver remote control报错 The path to the driver executabl...

2013-06-05  刘俊 

今天用watir-webdriver启动另外一台机器运行脚本的时候,总是报如下的错误:
[remote server] com.google.common.base.Preconditions(Preconditions.java):176:in `checkState': The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list (java.lang.IllegalStateException) (Selenium::WebDriver::Error::UnknownError)
 
在网上搜了,一种方法是JAVA方式:
System.setProperty("webdriver.chrome.driver",
"src/main/resources/drivers/chrome/chromedriver-mac");
可惜我用的是ruby,另外一种方式是在环境变量里面加chromedriver.exe的路径,两种方法都没生效。另外我还在ruby的bin目录下加了exe驱动文件,也不行。最后放到system32下面才解决,留作记录。
 
 
426°/4268 人阅读/0 条评论 发表评论

登录 后发表评论