I'm updating the version of Firefox we use for our in house Selenium tests. As part of this I know I need to use the GeckoDriver, in a similar way that we need to use the ChromeDriver for Chrome. It seems to be all plumbed in but the Software Under Test uses a self signed ssl cert, which will give you the "untrusted" cert warning before proceeding. In order to work around this, I have the following code:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
capabilities = DesiredCapabilities.FIREFOX
capabilities['acceptSslCerts'] = True
firefox_log = "<path to firefox log>"
DRIVER = webdriver.Firefox(firefox_profile=profile, executable_path=<path to gecko driver exe>, capabilities=capabilities, log_path=firefox_log)
However, when the tests run, it does run/open Firefox, but it instantly errors with he following:
WebDriverException: Message: Reached error page: about:certerror?e=nssBadCert&u=https%3A//10.10.10.10/&c=UTF-8&f=regular&d=10.10.10.10%20uses%20an%20invalid%20security%20certificate.%0A%0AThe%20certificate%20is%20not%20trusted%20because%20it%20is%20self-signed.%0AThe%20certificate%20is%20only%20valid%20for%20%3Ca%20id%3D%22cert_domain_link%22%20title%3D%22amnesiac%22%3Eamnesiac%3C/a%3E%0A%0AError%20code%3A%20%3Ca%20id%3D%22errorCode%22%20title%3D%22SEC_ERROR_UNKNOWN_ISSUER%22%3ESEC_ERROR_UNKNOWN_ISSUER%3C/a%3E%0A
I know that there was a bug in this area but I was under the impression it was fixed. Am I missing something?
Version Info:
- Firefox Version: 51.0.1
- GeckoDriver Version: 0.14.0
- Selenium Version: 3.0.2