Module: Capybara::DSL
- Defined in:
- lib/capybara-screenshot/capybara.rb
Instance Method Summary collapse
- #screenshot_and_open_image ⇒ Object
-
#screenshot_and_save_page ⇒ Object
Adds class methods to Capybara module and gets mixed into the current scope during Cucumber and RSpec tests.
- #using_session_with_screenshot(name) ⇒ Object (also: #using_session)
Instance Method Details
#screenshot_and_open_image ⇒ Object
10 11 12 |
# File 'lib/capybara-screenshot/capybara.rb', line 10 def screenshot_and_open_image ::Screenshot.screenshot_and_open_image end |
#screenshot_and_save_page ⇒ Object
Adds class methods to Capybara module and gets mixed into the current scope during Cucumber and RSpec tests
6 7 8 |
# File 'lib/capybara-screenshot/capybara.rb', line 6 def screenshot_and_save_page ::Screenshot.screenshot_and_save_page end |
#using_session_with_screenshot(name) ⇒ Object Also known as: using_session
14 15 16 17 18 19 20 21 |
# File 'lib/capybara-screenshot/capybara.rb', line 14 def using_session_with_screenshot(name) using_session_without_screenshot(name) do original_session_name = .session_name ::Screenshot.final_session_name = name yield ::Screenshot.final_session_name = original_session_name end end |