Selenium 2 Webdriver和IE 9安全证书 [英] Selenium 2 Webdriver and IE 9 Security Certificate

查看:119
本文介绍了Selenium 2 Webdriver和IE 9安全证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些用于Firefox和Internet Explorer 9的Selenium 2 Webdriver测试用例.当我在IE9(Windows 7 64位)上访问https URL时,出现此网站的安全证书有问题".此时,测试挂起并最终失败.我试过了:

  • 让Selenium单击继续浏览此网站(不推荐)".关联.无法完成此操作,因为此错误页面不是您通常的页面.与JavaScript相同-它不会执行.
  • 我尝试添加注册表项
    HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Internet Explorer \ MAIN \ FeatureControl \ FEATURE_ERROR_PAGE_BYPASS_ZONE_CHECK_FOR_HTTPS_KB954312
    阻止显示证书错误页面-无效.可能是因为我在使用IE9的Windows 7上.
  • 遵循建议,我尝试使用browsermob代理,但是那里的文档很少,我无法解决.
  • I have some Selenium 2 Webdriver test cases for Firefox and Internet Explorer 9. When I access https URLs on IE9 (Windows 7 64bit) I get "There is a problem with this website's security certificate". At this point the test hangs and eventually fails. I tried:

  • Getting Selenium to click on the "Continue to this website (not recommended)." link. This can't be done as this error page is not your usual page. Same with JavaScript - it doesn't execute.
  • I tried adding the registry key
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ERROR_PAGE_BYPASS_ZONE_CHECK_FOR_HTTPS_KB954312
    that prevents the certificate-error-page from displaying - didn't work. Probably because I'm on Windows 7 with IE9.
  • Following this advice I tried using browsermob proxy, but there's very little documentation out there and I couldn't work it out.
  • 最后,我没有对我的PC的管理员访问权限-例如无法访问组策略. Selenium 2 Webdriver在Firefox上运行良好.我已经在IE Internet选项中启用了所有安全区域,并且如果我在其他URL(http)上运行测试,那么就没有问题.

    Finally, I don't have admin access to my PC - e.g. no access to group policies. Selenium 2 Webdriver works fine on Firefox. I have all security zones enabled in IE Internet Options and if I run the tests on other URLs (http) then there is no problem.

    有人解决这个问题吗?现在有人热衷于有效使用browsermob代理(或任何其他代理)来克服此问题吗?

    Has anyone got a solution to this problem? Does anyone now hot to use browsermob proxy (or any other proxy) effectively to overcome this issue?

    谢谢, 达摩

    推荐答案

    我在SQA板上找到了答案: https://sqa.stackexchange.com/questions/1928/selenium-2-webdriver-and-ie-9-安全证书

    I found the answer on the SQA board: https://sqa.stackexchange.com/questions/1928/selenium-2-webdriver-and-ie-9-security-certificate

    我们创建了一个证书,它就像一个饰物.

    We created a certificate and it It worked like a charm.

    这篇关于Selenium 2 Webdriver和IE 9安全证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆