How do I force Firefox Selenium Webdriver(Python) to accept any SSL certificates

筅森魡賤 提交于 2019-12-01 07:33:28

The issue is the Firefox Version 47 (see https://github.com/SeleniumHQ/selenium/issues/2110).

So you are good to go to wait for a fix of Firefox/Selenium or you downgrade to Firefox 46.

Rémi Debette

The Firefox Self-signed certificate bug has now been fixed: accept ssl cert with marionette firefox webdrive python splinter

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary

caps = DesiredCapabilities.FIREFOX.copy()
caps['acceptInsecureCerts'] = True
ff_binary = FirefoxBinary("path to the Nightly binary")

driver = webdriver.Firefox(firefox_binary=ff_binary, capabilities=caps)
driver.get("https://expired.badssl.com")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!