Python 如何让Selenium使用真正的证书打开HTTPS URL?

Python 如何让Selenium使用真正的证书打开HTTPS URL?,python,selenium,https,Python,Selenium,Https,我正在尝试使用selenium自动化一些基于浏览器的数据输入。目标URL是HTTPS,但它是实际的公共网站,不是自签名证书。我正在运行以下代码: from selenium import selenium import unittest, time, re class python_2_remote_control(unittest.TestCase): def setUp(self): self.verificationErrors = [] self

我正在尝试使用selenium自动化一些基于浏览器的数据输入。目标URL是HTTPS,但它是实际的公共网站,不是自签名证书。我正在运行以下代码:

from selenium import selenium
import unittest, time, re

class python_2_remote_control(unittest.TestCase):
    def setUp(self):
        self.verificationErrors = []
        self.selenium = selenium("localhost", 4444, "*chrome", "https://actualurl")
        self.selenium.start()

    def test_python_2_remote_control(self):
        sel = self.selenium
        sel.type("id=loginid", "etc.")
        more...

代理加载,但实际的URL似乎从未加载,任何我的第一个登录命令都失败。有没有意识到什么可能会失败?

如果您的https需要证书,您将需要自己的selenium firefox配置文件来接受证书

谷歌如何在selenium中使用自定义firefox配置文件

服务器命令行:

java -jar selenium-server.jar -log SeleniumServer.log -firefoxProfileTemplate "C:\ffprofile" -trustAllSSLCertificates