如何强制Firefox Selenium Webdriver(Python)接受任何SSL证书 [英] How do I force Firefox Selenium Webdriver(Python) to accept any SSL certificates
问题描述
我正在尝试修复内部应用程序的测试,目前我不关心安全性(我只是希望它能够正常工作).
I'm trying to fix testing for an internal app and I don't care about security at the moment (I just want it to work).
它给我SSL警告,这破坏了测试.具体来说,您的连接不安全/SEC_ERROR_UNKOWN_ISSUER.
It's giving me SSL warnings which breaks the testing. Specifically Your connection is not secure/ SEC_ERROR_UNKOWN_ISSUER.
我尝试同时设置capabilities['acceptSslCerts'] = True
和
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
均无效.驱动程序在构造驱动程序后列出的功能会将acceptSslCerts设置为false.
and neither works. The capabilities listed by the driver after constructing it has acceptSslCerts as false.
请注意,我使用的是Python和Firefox 47.
Note I'm using Python and Firefox 47.
我也转而使用新的木偶Firefox Webdriver,因为常规的启动器在启动时崩溃了.
Also I switched to using the new marionette Firefox Webdriver because the regular one was crashing on startup.
推荐答案
The issue is the Firefox Version 47 (see https://github.com/SeleniumHQ/selenium/issues/2110).
因此,您很高兴去等待来修复Firefox/Selenium,或者降级到 Firefox 46 .
So you are good to go to wait for a fix of Firefox/Selenium or you downgrade to Firefox 46.
这篇关于如何强制Firefox Selenium Webdriver(Python)接受任何SSL证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!