Module: Capybara::DSL

Defined in:
lib/capybara-screenshot/capybara.rb

Instance Method Summary collapse

Instance Method Details

#screenshot_and_open_imageObject



12
13
14
# File 'lib/capybara-screenshot/capybara.rb', line 12

def screenshot_and_open_image
  Capybara::Screenshot.screenshot_and_open_image
end

#screenshot_and_save_pageObject

Adds class methods to Capybara module and gets mixed into the current scope during Cucumber and RSpec tests



8
9
10
# File 'lib/capybara-screenshot/capybara.rb', line 8

def screenshot_and_save_page
  Capybara::Screenshot.screenshot_and_save_page
end

#using_session_with_screenshot(name, &blk) ⇒ Object Also known as: using_session



16
17
18
19
20
21
# File 'lib/capybara-screenshot/capybara.rb', line 16

def using_session_with_screenshot(name,&blk)
  original_session_name = Capybara.session_name
  Capybara::Screenshot.final_session_name = name
  using_session_without_screenshot(name,&blk)
  Capybara::Screenshot.final_session_name = original_session_name
end