also add confirm js
This commit is contained in:
parent
98829baf2b
commit
0e66f6a81b
4
lib/cuke-pack/support/confirm_js.rb
Normal file
4
lib/cuke-pack/support/confirm_js.rb
Normal 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
|
@ -1,5 +1,6 @@
|
||||
require 'cuke-pack/support/pause'
|
||||
require 'cuke-pack/support/pending'
|
||||
require 'cuke-pack/support/confirm_js'
|
||||
|
||||
Before do
|
||||
# if you want pending steps to pause before marking the step as pending,
|
||||
@ -23,3 +24,7 @@ require 'cuke-pack/support/flay'
|
||||
|
||||
# Timecop support
|
||||
# require 'cuke-pack/support/timecop'
|
||||
|
||||
# Browser drivers
|
||||
# use with ENV['DRIVER']
|
||||
# require 'cuke-pack/driver/firefox'
|
||||
|
Loading…
Reference in New Issue
Block a user