黄瓜点击对话框删除

时间:2014-11-11 18:17:27

标签: ruby-on-rails-4 cucumber cucumberjs

检查属性是否被排除,确认对话框,使用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'

gems install

group :test do
   gem 'cucumber-rails', :require => false
   gem 'capybara', '~> 2.4'
   gem 'database_cleaner', '~> 1.3'
   gem 'rspec-rails', '~> 3.1.0'
end

0 个答案:

没有答案