Sha256: 77b1d838830d4bcde3e550c0f8164d513822825ec30b73f1093707cea218ab55

Contents?: true

Size: 290 Bytes

Versions: 9

Compression:

Stored size: 290 Bytes

Contents

require 'selenium-webdriver'

%x[rm aipim/screenshots/*]

Before('@javascript') do |scenario|
	page.driver.browser.manage.window.maximize
end

After('@screenshot') do
	return unless page.driver.browser
	sleep(1.0)
	page.driver.save_screenshot("aipim/screenshots/#{Time.now.to_i}.png")
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aipim-rails-0.0.40 lib/screenshot.rb
aipim-rails-0.0.23 lib/screenshot.rb
aipim-rails-0.0.22 lib/screenshot.rb
aipim-rails-0.0.21 lib/screenshot.rb
aipim-rails-0.0.20 lib/screenshot.rb
aipim-rails-0.0.19 lib/screenshot.rb
aipim-rails-0.0.18 lib/screenshot.rb
aipim-rails-0.0.17 lib/screenshot.rb
aipim-rails-0.0.16 lib/screenshot.rb