检查属性是否被排除,确认对话框,使用 rails 4
Quando(/^confirmo$/) do
page.execute_script 'window.confirm = function () { return true }'
end
返回错误
> Capybara::Driver::Base#execute_script (Capybara::NotSupportedByDriverError)
./features/step_definitions/covenats_steps.rb:80:in `/^confirmo$/'
features/covenats.feature:48:in `E confirmo'
宝石安装
group :test do
gem 'cucumber-rails', :require => false
gem 'capybara', '~> 2.4'
gem 'database_cleaner', '~> 1.3'
gem 'rspec-rails', '~> 3.1.0'
end