Selenium 和 HTTPS/SSL

发布于 2024-08-24 18:09:10 字数 490 浏览 2 评论 0原文

我在 Mac OS X 和 Mac OS X 上运行 selenium-rc 1.0.3 Windows 7 和两者似乎都给我带来了 Firefox 中烦人的接受证书错误。在阅读文档时,他们说我应该能够使用 *firefox 运行模式,并且 rc 应该通过代理或其他方式为我处理它,但这似乎不起作用。我在互联网上找到的唯一解决方案是创建一个骨架配置文件并将路径传递到 rc 启动中,但这不是一个真正的选择。因为这并不能解决 IE/Chrome/Safari 中的测试问题。有谁知道任何其他可行的解决方案。

HTTPS 上的 Selenium-RC 文档 - http://seleniumhq.org/ docs/05_selenium_rc.html#handling-https-and-security-popups

I'm running selenium-rc 1.0.3 on a Mac OS X & Windows 7 and both seem to be giving my the annoying accept cert error in firefox. In reading the docs they say I should be able to just use the *firefox run mode and rc should take care of it for me via a proxy or something, but this appears to not work. The only solution that I was able to find on the internet was to create a skeleton profile and pass the path into the rc startup, but thats not a real option. As that doesn't solve problems of testing in IE/Chrome/Safari. Does any know of any other solution that will work.

Selenium-RC docs on HTTPS - http://seleniumhq.org/docs/05_selenium_rc.html#handling-https-and-security-popups

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

江心雾 2024-08-31 18:09:11

我已经尝试过此 文章(感谢艾略特),它对我来说效果很好!基本上

1。创建 Firefox 配置文件:

在cmd.exe中启动firefox -ProfileManager(或firefox -P)(确保firefox安装文件夹路径在您的path环境变量中,默认情况下它应该是在您安装firefox时创建的)并创建一个新的配置文件。

b.选择此新配置文件以浏览到 HTTPS URL 并在出现提示时接受自签名证书。

c.转到 Firefox 配置文件目录。

d.删除目录中除 cert_override.txt 和 cert8.db 文件之外的所有内容。

2.使用此配置文件运行您的 selenium RC 服务器:

例如 java -jar selenium-server.jar -firefoxProfileTemplate c:/Firefox_Profile

I have tried the solution given by this article (Thanks elliot) and it works well for me! Basically

1. Create a firefox profile:

a. Starting your firefox -ProfileManager (or firefox -P) in cmd.exe (make sure the firefox installation folder path is in your path environment variable, by default it should be just created when you installed firefox) and create a new profile.

b. Select this new profile to browse to the HTTPS URL and accept the self-signed certificate when prompted.

c. Go to the Firefox profile directory.

d. Delete everything in the directory except for the cert_override.txt and cert8.db files.

2. Run your selenium RC server using this profile:

such as java -jar selenium-server.jar -firefoxProfileTemplate c:/Firefox_Profile

情愿 2024-08-31 18:09:11

如果这是自签名证书的问题,您可以尝试在自定义配置文件中使用 Firefox 的 RCE 插件:http://sejq.blogspot.com/2009/01/remember-certificate-exception.html

可以通过高级设置禁用 Internet Explorer 的警告(具体取决于版本IE)。值得谷歌搜索解决方案。

对于 Google Chrome,我认为这是一个与以下相关的未解决问题:http://code.google.com/p/chromium/issues/detail?id=2010&can =5&colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS

If this is an issue with self-signed certificates, you could try using the RCE plugin for Firefox in a custom profile: http://sejq.blogspot.com/2009/01/remember-certificate-exception.html

Internet Explorer's warnings can be disabled through the advanced settings (specifics depend on the version of IE). Worth Googling around for a solution.

For Google Chrome I believe this is an unresolved issue related to: http://code.google.com/p/chromium/issues/detail?id=2010&can=5&colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文