如何通过 Selenium RC 远程控制 google chrome 中的 https 站点
我有一个连接到内部门户的简单测试。我有 selenium RC 连接到虚拟机上的多个浏览器(IE7、FF 4、Opera、Chrome)。当我将测试发送到 FF 或 IE 时,测试运行正常,当我将其发送到 Chrome 时,我收到证书错误:
该网站的安全证书不受信任! 您尝试访问portal.xxx.com,但服务器提供的证书是由您的计算机不信任的实体颁发的。
我已使用certmgr.msc 将*.xxx.com 证书添加到Windows 受信任列表中。我还检查了认证链。
*.xxx.com 已获得 GoDaddy 安全证书颁发机构的认证,该证书颁发机构列在我的中级证书颁发机构中。
GoDaddy 安全证书颁发机构由 GoDaddy 2 类证书颁发机构认证,该证书颁发机构列在我的“受信任的根证书颁发机构”中,
Ross 的出色建议。为了实现这一点,我在启动远程控制时进行了以下更改:
ant -Denvironment="Chrome on %OS_Name%" -DseleniumArgs="-trustAllSSLCertificates" -Dhost="%username%.xxxxxlab.yyyyy.com" -DhubURL="http://segrid.xxxxxlab.yyyyy.com:4444" -Dport=5558 launch-remote-control
正确吗?如果是这样,这并不能解决我的问题
I have a simple test that connects to an internal portal. I have selenium RC connecting to several browsers on a VM (IE7, FF 4, Opera, Chrome). When I send my test to FF or IE the test runs fine, when I send it to Chrome, I am getting a certificate error:
The site's security certificate is not trusted!
You attempted to reach portal.xxx.com, but the server presented a certificate issued by an entity that is not trusted by your computer's
I have used certmgr.msc to add *.xxx.com certificate to windows trusted list. I also have examined the certification chain.
*.xxx.com is certified by Go Daddy Secure Certification Authority, which is listed in my Intermediate Certification Authorities.
Go Daddy Secure Certification Authority is certified by Go Daddy Class 2 Certification Authority, which is listed in my Trusted Root Certification Authorites
Excellent suggestion by Ross. To implement I have made the following change in my launch of the remote control:
ant -Denvironment="Chrome on %OS_Name%" -DseleniumArgs="-trustAllSSLCertificates" -Dhost="%username%.xxxxxlab.yyyyy.com" -DhubURL="http://segrid.xxxxxlab.yyyyy.com:4444" -Dport=5558 launch-remote-control
Is that correct? If so, it is not solving my problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Selenium RC 每次启动浏览器时都会生成一个新的浏览器配置文件。这听起来像是将 SSL 配置更改放入新配置文件时出现的问题。
RC 的 Firefox 支持可以让您提供配置文件内容的入门集,RC 使用该入门集而不是内置的入门集。 Chrome 支持似乎没有类似的东西。添加它的位置可能在 /server-coreless/src/main/java/org/openqa/selenium/server/browserlaunchers/GoogleChromeLauncher.java 中,至少在 1.0.x 源代码中是这样。
看来 Selenium 2.0b3 可能适合你。 Svn #9567 (2010-09-01) 添加了一个“-trustAllSSLCertificates”选项来告诉 Chrome 忽略证书错误。
Selenium RC generates a new browser profile every time it starts a browser. This sounds like a problem with getting your SSL-configuration change into that new profile.
RC's Firefox support has a way for you to supply a starter-set of profile content, which RC uses instead of its baked-in starter-set. It doesn't appear that the Chrome support has anything similar. The place to add it would probably be in /server-coreless/src/main/java/org/openqa/selenium/server/browserlaunchers/GoogleChromeLauncher.java, at least in the 1.0.x source.
It appears that Selenium 2.0b3 might work for you. Svn #9567 (2010-09-01) added a "-trustAllSSLCertificates" option to tell Chrome to ignore certificate errors.