19
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Selenium(Capybara)でChromeを使う

Last updated at Posted at 2012-12-26

selenium-webdriverでテストする場合に、Chromeをブラウザとして使う。

まず、chromedriverをダウンロード(最新バージョンの自分のプラットフォームのもの)、インストール $ sudo mv ~/Downloads/chromedriver /usr/bin/

spec/support/selenium_chromedriver.rb
Capybara.register_driver :selenium do |app|
  # http://code.google.com/p/chromedriver/downloads/list
  # sudo mv ~/Downloads/chromedriver /usr/bin/
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end

上記はRSpecの場合。
Inspectorが使いやすいのと慣れているのとでデバッグしやすい。

19
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?