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

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

问题描述

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

  • 让 Selenium 点击继续浏览此网站(不推荐)".关联.这无法完成,因为此错误页面不是您常用的页面.与 JavaScript 相同 - 它不执行.
  • 我尝试添加注册表项
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_ERROR_PAGE_BYPASS_ZONE_CHECK_FOR_HTTPS_KB954312
    阻止显示证书错误页面 - 无效.可能是因为我使用的是带有 IE9 的 Windows 7.
  • 遵循 this 建议,我尝试使用 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_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_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-security-certificate

    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天全站免登陆