【发布时间】:2019-12-02 21:40:00
【问题描述】:
我们的端到端测试使用 Django 的 LiveServerTestCase 和 Selenium。到目前为止,我们只能在不安全的 url 上运行这些。但是,我们使用的一些库(Square)要求页面在 https 上,即使在沙盒模式下也是如此。
当尝试连接到安全 url 时,Selenium/Chrome Webdriver 只会显示标准 SSL 不支持错误:
This site can’t provide a secure connection chezpierre.localtest.me sent an invalid response.
ERR_SSL_PROTOCOL_ERROR
有谁知道是否可以在 LiveServerTestCase 上启用 https?
如果没有,是否有人对此有解决方法?我试图避免在我们的构建盒上运行单独的 https 代理,但似乎这可能是唯一的方法。
【问题讨论】:
-
您在尝试使用 https 时遇到哪些错误?
-
@mrangry777 我编辑了问题以显示错误。
-
您有机会试用我的解决方案吗?
标签: python django selenium https automated-tests