mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Driver#render renamed to Driver#save_screenshot
This commit is contained in:
parent
c8f243e05f
commit
32b92adb32
3 changed files with 2 additions and 6 deletions
|
@ -101,10 +101,6 @@ capybara-webkit supports a few methods that are not part of the standard capybar
|
|||
page.driver.evaluate_script("window.innerWidth")
|
||||
=> 500
|
||||
|
||||
**render**: render a screenshot of the current view (requires [mini_magick](https://github.com/probablycorey/mini_magick) and [ImageMagick](http://www.imagemagick.org))
|
||||
|
||||
page.driver.render "tmp/screenshot.png"
|
||||
|
||||
**cookies**: allows read-only access of cookies for the current session
|
||||
|
||||
page.driver.cookies["alpha"]
|
||||
|
|
|
@ -160,7 +160,7 @@ module Capybara::Webkit
|
|||
false
|
||||
end
|
||||
|
||||
def render(path, options={})
|
||||
def save_screenshot(path, options={})
|
||||
options[:width] ||= 1000
|
||||
options[:height] ||= 10
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ describe Capybara::Webkit::Driver, "rendering an image" do
|
|||
|
||||
def render(options)
|
||||
FileUtils.rm_f @file_name
|
||||
driver.render @file_name, options
|
||||
driver.save_screenshot @file_name, options
|
||||
|
||||
@image = MiniMagick::Image.open @file_name
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue