Nightwatch与自签名证书

时间:2018-01-02 15:41:29

标签: ssl nightwatch.js

我对Geckodriver的nightwatch.js设置如下:

    "firefox": {
        "launch_url": "...",
        "selenium_port": 4444,
        "selenium_host": "localhost",
        "silent": true,
        ...
        "desiredCapabilities": {
            "browserName": "gecko",
            "marionette": true,
            "acceptSslCerts": true
        }
    }

运行时,所有测试都会失败,因为我的证书是对本地安装的不安全测试并强制执行ssl。 Chromedriver(基本相同的设置)似乎接受“acceptSslCerts”属性并忽略了错误的证书。 Geckodriver没有。配置错误或者Nightwatch或Selenium是否存在“acceptSslCerts”问题?

我使用的是最新版本的Geckodriver和Selenium 3.8.1

1 个答案:

答案 0 :(得分:3)

看起来firefox驱动程序的正确功能是acceptInsecureCerts

您可以看到列出here

相关问题