【发布时间】:2014-11-14 01:11:31
【问题描述】:
我知道还有一个与此类似的问题,但回答者提供的链接已过时(当我深入研究当前的 Watir 文档时,我只能找到有关 Windows 8.1 的信息;我在 Windows 7 上,步骤该文档建议解决此问题对以下内容没有帮助)
我正在尝试使用 Watir/minitest 执行测试(沿着 rake ci:setup:minitest test TEST=test/full_path/happypath_test.rb 的行),但它在以下情况下窒息:
Selenium::WebDriver::Error::WebDriverError: Unable to find the chromedriver exec
utable. Please download the server from http://chromedriver.storage.googleapis.c
om/index.html and place it somewhere on your PATH. More info at http://code.goog
le.com/p/selenium/wiki/ChromeDriver.
Watir 文档和错误消息都指向 PATH。但是,我刚刚下载了最新版本的 Chromedriver(出现了 2.12)并将 exe 放入了一个我已经确认在我的 PATH 中的文件夹中(特别是 c:/Ruby193/bin - 是的,我知道我在一个旧的Ruby 版本;可惜我不能为这个项目更新)
我知道 Chromedriver 存在,因为我可以从 irb 运行它:
require 'watir-webdriver
紧随其后
b = Watir::Browser.new :chrome
这会启动一个 chrome 窗口。但是当我实际尝试执行测试时,它会给出“找不到 chromedriver”错误。
我已经运行了 bundle install 来尝试确保我使用了正确的版本并且不知道还能做什么。请帮忙?
【问题讨论】:
标签: selenium watir selenium-chromedriver