打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
selenium ssl

使用FF测试SSL

1)       下载firefox插件(FF2.0remember_mismatched_domains; FF3.0:remember cetificates exception)

   下载地址:FF2.0https://addons.mozilla.org/en-US/firefox/addon/2131

  FF3.0https://addons.mozilla.org/en-US/firefox/addon/10246

 

2)       复制FFcustomProfile到脚本目录下;

       文件位置:C:\DocumentsandSettings\Administrator\ApplicationData\Mozilla\Firefox\Profiles\nvvxu5e6.default

(文 件名不一定为nvvxu5e6.default,但一定以.default结尾)

 

3)       Cmd中运行命令:java -jar selenium-server.jar-multiwindow -firefoxProfileTemplate "nvvxu5e6.default"

rcConfig = new RemoteControlConfiguration();
                rcConfig.setFirefoxProfileTemplate(new File(
                        "C: \\Documents and Settings \\Administrator\\Local Settings \\Application Data \\Mozilla\\Firefox\\Profiles\\43hj9jh6.default"));
                server = new SeleniumServer(rcConfig);
                server = new SeleniumServer();
                server.start();

 

4)selenium = new DefaultSelenium("localhost", 4444, "*chrome",url);

 

使用IE测 试SSL:(当然首先要把*chrome改成*iehta
1.安装上cybervillainsCA.cer,($HOME\selenium-server-0.9.2\sslSupport,确定这个证书被importthe Trusted Root certification Authorities

2. IE Browser -> Tools -> InternetOptions ->Advaceduncheck两个选项

   1) check the publisher's certificate revocation.(检查发行商证书的吊销)

   2) Warn about certificate address mismatch(对无效站点证书发出警告)

然后重启IE,再执行selenium脚本,那个烦人的security alert警告对话框就不会再烦人了。这样做有安全隐 患,建议在虚拟机里执行,或者,执行完测试脚本后将IE恢复修改前的设置。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Selenium-webdriver系列教程(13)————使用已存在的profile启动firefox
selenium IDE 录制
Web应用自动化验收工具——Selenium系列预研
selenium和python介绍
揭秘webdriver实现原理 | 乙醇的开源自动化工具研究Blog
使用Selenium进行验收测试
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服