follow me icons

Wednesday, August 22, 2012

Ignore browser untrusted security certificate

To ignore the browser untrusted security certificate so that the cucumber test can be run in the test environment you can modify the env.rb to ignore the warning:
require 'selenium/webdriver'

Capybara.register_driver :selenium do |app|
   profile = Selenium::WebDriver::Firefox::Profile.new
   profile.assume_untrusted_certificate_issuer = false
   Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)
end

1 comment:

  1. Is it possible I can pass variable here
    profile = Selenium::WebDriver::Variable::Profile.new
    instead of
    profile = Selenium::WebDriver::Firefox::Profile.new

    and I can give any value to that variable like Firefox or Chrome

    ReplyDelete