lib/prickle/capybara.rb in prickle-0.0.4 vs lib/prickle/capybara.rb in prickle-0.0.5

- old
+ new

@@ -8,14 +8,10 @@ class << self attr_accessor :wait_time, :image_dir end - def capture_screen name=screenshot_name - page.driver.browser.save_screenshot Capybara.image_dir + name + ".jpg" - end - def click_by_name name find_by_name(name).click end def confirm_popup @@ -40,10 +36,14 @@ def popup_message_contains? message raise Exceptions::MessageNotContainedInPopup.new(message) unless popup_message.eql? message end + def capture_screen name=screenshot_name + page.driver.browser.save_screenshot Capybara.image_dir + name + ".jpg" + end + private TIME_FORMATTER = "%Y%m%d-%H.%M.%s" def method_missing method, *args @@ -59,9 +59,7 @@ end def screenshot_name Time.now.strftime(TIME_FORMATTER) end - end - end