您的位置:首页 > 运维架构 > 网站架构

Watir: 应用Watir-Webdriver 访问需要证书的网站情况

2013-08-16 16:51 225 查看
#Suppose we will access an SVN net
require 'watir-webdriver'
b = Watir::Browser.new :chrome
b.goto 'https://admin:password@yourwebsite.com'

#Firefox Deal with Certification:
profile = Selenium::WebDriver::Firefox::Profile.new
profile.assume_untrusted_certificate_issuer = false
b = Watir::Browser.new :firefox, :profile => profile

#Chrome Deal with Certification:
Watir::Browser.new :chrome, :switches => ['--ignore-certificate-errors']
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐