2017-03-03 94 views
2

IRB我做了以下内容:硒:: webdriver的::错误:: WebDriverError:无法连接到chromedriver

require "watir" 
b = Watir::Browser.new :chrome 

然后我得到以下错误:

Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515 

OSX 10.12.3 Ruby 2.3.1 Chrome驱动程序最新版本 Watir 6.2.0

+1

你需要下载驱动程序,请参阅http://stackoverflow.com/questions/27719345/how-to-specify-the-location-of-the-chromedriver-binary –

+2

你可以'gem install webdrivers'和它将自动使您的系统保持最新版本的任何驱动程序正在使用 – titusfortner

回答

1
gem install webdrivers

为我工作。

相关问题