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
你需要下載驅動程序,請參閱http://stackoverflow.com/questions/27719345/how-to-specify-the-location-of-the-chromedriver-binary –
你可以'gem install webdrivers'和它將自動使您的系統保持最新版本的任何驅動程序正在使用 – titusfortner