Help us understand the problem. What is going on with this article?

SeleniumWebdriver の Chromeを入れる

More than 5 years have passed since last update.

エラー

`executable_path': Unable to find the chromedriver executable. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver. (Selenium::WebDriver::Error::WebDriverError)

エラーに書かれているページに行く

http://chromedriver.storage.googleapis.com/index.html

最新のディレクトリに行き、OSにあったzipをダウンロード

2.9

chromedriver_mac32.zip 2014-02-01 03:43:26 4.25MB

展開する

=> chromedriver

$PATHに置く

mv ~/Downloads/chromedriver /usr/local/bin/

プロキシ設定

プロキシ配下めんど・・・・
https_proxyをbash_profileに記載していると、no_proxyに127.0.0.1を入れておかないとダメらしい。

使う

require 'selenium-webdriver'

driver = Selenium::WebDriver.for :chrome
driver.quit
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away