also add confirm js

This commit is contained in:
John Bintz 2012-08-22 13:33:06 -04:00
parent 98829baf2b
commit 0e66f6a81b
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,4 @@
def confirm_js
page.evaluate_script('window.confirm = function() { return true; }')
page.evaluate_script('window.alert = function() { return true; }')
end

View File

@ -1,5 +1,6 @@
require 'cuke-pack/support/pause' require 'cuke-pack/support/pause'
require 'cuke-pack/support/pending' require 'cuke-pack/support/pending'
require 'cuke-pack/support/confirm_js'
Before do Before do
# if you want pending steps to pause before marking the step as pending, # if you want pending steps to pause before marking the step as pending,
@ -23,3 +24,7 @@ require 'cuke-pack/support/flay'
# Timecop support # Timecop support
# require 'cuke-pack/support/timecop' # require 'cuke-pack/support/timecop'
# Browser drivers
# use with ENV['DRIVER']
# require 'cuke-pack/driver/firefox'