运维开发网

拒绝连接! selenium服务器是否已启动?

运维开发网 https://www.qedev.com 2020-05-10 11:02 出处:网络 作者:运维开发网整理
我正在使用Jenkins进行selenium nightwatch测试. 当我运行测试时,我收到以下错误: Connection refused! Is selenium server started? 我的nightwatch.json文件中有以下配置: "selenium": { "start_process": true, "server_path": "li
我正在使用Jenkins进行selenium nightwatch测试.

当我运行测试时,我收到以下错误:

Connection refused! Is selenium server started?

我的nightwatch.json文件中有以下配置:

"selenium": {
        "start_process": true,
        "server_path": "lib/selenium-server-standalone-2.52.0.jar",
        "log_path": "",
        "host": "127.0.0.1",
        "port": 4444,
        "cli_args": {
            "webdriver.chrome.driver": "lib/chromedriver",
            "webdriver.ie.driver": "lib/IEDriverServer_x64_2.52.2.exe",
            "trustAllSSLCertificates": true
        }

我猜jenkins试图连接到PORT,但无法这样做.有人可以帮忙吗?

确保browserName正确无误.

"desiredCapabilities": {
    "browserName": "internet explorer",
    "javascriptEnabled": true,
    "acceptSslCerts": true
}

browserName:“Internet explorer”而不是“ie”你也错过了webdriver.chrome.driver中的“.exe”

0

精彩评论

暂无评论...
验证码 换一张
取 消