vendredi 20 novembre 2015

Combine two drivers for Capybara

I'm currently using this configuration to hide qt messages in the console:

Capybara.register_driver :webkit_with_qt_plugin_messages_suppressed do |app|
 Capybara::Webkit::Driver.new(app,Capybara::Webkit::Configuration.to_hash.merge(stderr: WebkitStderrWithQtPluginMessagesSuppressed.new))
end

Capybara.javascript_driver = :webkit_with_qt_plugin_messages_suppressed

but I also need to ignore ssl errors:

Capybara::Driver::Webkit.new({ :ignore_ssl_errors => true})

The problem is that if i do

Capybara.register_driver :webkit_with_qt_plugin_messages_suppressed do |app|
 Capybara::Webkit::Driver.new(app,Capybara::Webkit::Configuration.to_hash.merge(stderr: WebkitStderrWithQtPluginMessagesSuppressed.new))
 Capybara::Webkit::Driver.new(app, :ignore_ssl_errors => true)
end

the test passes but I see qt messages.
Is there any way to do it?

Aucun commentaire:

Enregistrer un commentaire