31
32

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.

capybara-webkitでWebページのスクリーンショットを撮る2013

Posted at

capybara-webkitでwebページのスクリーンショットを撮る - 橋本詳解 - http://d.hatena.ne.jp/shokai/20120302/1330670227

最新の capybara-webkit だとこちらのコードは動かない模様

Macの場合

brew install qt
gem install capybara-webkit
require 'capybara-webkit'

browser = Capybara::Webkit::Driver.new('web_capture').browser
browser.visit 'http://qiita.com/'
browser.render('qiita.png', 1280, 650)

参考 / capybara-webkit/lib/capybara/webkit/driver.rb at master · thoughtbot/capybara-webkit · GitHub - https://github.com/thoughtbot/capybara-webkit/blob/master/lib/capybara/webkit/driver.rb

31
32
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
31
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?