2

伙计们,

我在使用时遇到问题@profile.assume_untrusted_certificate_issuer,所以这是我的代码片段:

@profile = Selenium::WebDriver::Firefox::Profile.new
@profile.assume_untrusted_certificate_issuer = false
@browser = Watir::Browser.new(:firefox, :profile => @profile)

但是当我运行它时,我仍然在 Firefox 中得到安全异常。还有什么我需要设置的。

非常感谢

4

1 回答 1

-1

在您的代码片段中执行以下操作:

   @profile=Selenium::WebDriver::Firefox::Profile.from_name "default"
   @profile.assume_untrusted_certificate_issuer=false
   @profile.secure_ssl = true 
   browser = Watir::Browser.new :firefox, :profile => @profile

您还可以创建自定义 firefox 配置文件。如果您需要不同的个人资料

于 2012-08-29T11:16:28.410 回答