从selenium服务器驱动程序检索新会话时出错。版本:未知错误:“未创建会话”

时间:2018-08-30 12:50:56

标签: selenium docker jenkins nightwatch.js end-to-end

我想从您那里得到一些帮助。

我的守夜人配置文件如下:

{
"src_folders" : ["tests"],
"output_folder" : "reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"page_objects_path" : "",
"globals_path" : "",

"selenium" : {
  "start_process" : true,
  "server_path" : "./bin/selenium-server-standalone-3.9.1.jar",
  "log_path" : "",
  "port" : 4444,
  "cli_args" : {
    "webdriver.chrome.driver" : "./bin/chromedriver",
    "webdriver.gecko.driver" : "./bin/geckodriver"
  }
},

"test_settings" : {
  "default" : {
    "launch_url" : "http://localhost",
    "selenium_port"  : 4444,
    "selenium_host"  : "localhost",
    "silent": true,
    "screenshots" : {
      "enabled" : false,
      "path" : ""
    },
    "desiredCapabilities": {
      "browserName": "firefox",
      "marionette": true
    }
  },

  "chrome" : {
    "desiredCapabilities": {
      "browserName": "chrome"
    }
  }

}
}

我的测试文件具有以下代码:

module.exports = {

'Demo test Google' : function (browser) {
  browser
    .url('http://www.google.com')
    .waitForElementVisible('body', 1000)
    .setValue('input[type=text]', 'nightwatch')
    .waitForElementVisible('button[name=btnG]', 1000)
    .click('button[name=btnG]')
    .pause(5000)
    .assert.containsText('#main', 'Night Watch')
    .end();
}

 };

我得到的错误是:

运行:对Google进行演示测试

从硒服务器检索新会话时出错

连接被拒绝!硒服务器启动了吗?    { 值:    { 信息:       '无法创建新服务:GeckoDriverService \ n内部版本信息:版本:\'3.9.1 \',版本:\'63f7b50 \',时间:\'2018-02-07T22:42:28.403Z \'\ n系统信息:主机:\'LAPTOP-L754TGS6 \',ip:\'192.168.85.1 \',操作系统名称:\'Windows 10 \',os.arch:\'amd64 \',os.version:\ '10 .0 \' ,java.version:\'1.8.0_171 \'\ n驱动程序信息:driver.version:未知',      错误:“未创建会话”},   状态:33

}

geckodriver版本:0.21.0 chromedriver版本:2.41

0 个答案:

没有答案