Nightwatch-从selenium服务器检索新会话时出错连接被拒绝! selenium服务器是否已启动?

时间:2017-11-02 18:57:14

标签: selenium nightwatch.js

我的e2e夜班测试在我的MacOS中运行得非常好,而在我的linux CI服务器中,它失败并出现错误 -

Error Screenshot

这是我的nightwatch.conf.js

module.exports = {
  src_folders: ['tests/e2e/specs'],
  output_folder: 'tests/e2e/reports',
  custom_assertions_path: ['tests/e2e/custom-assertions'],
  page_objects_path: ['tests/e2e/page_objects'],

  selenium: {
    start_process: false,
    server_path: require('selenium-server').path,
    host: '127.0.0.1',
    port: 4444,
    cli_args: {
      'webdriver.chrome.driver': require('chromedriver').path
    }
  },

  test_settings: {
    default: {
      selenium_port: 4444,
      selenium_host: 'localhost',
      silent: true,
      globals: {
        devServerURL: 'http://localhost:9000'
      }
    },

  chrome: {
    desiredCapabilities: {
      browserName: 'chrome',
      javascriptEnabled: true,
      acceptSslCerts: true,
      chromeOptions: {
        args: ['headless', 'disable-gpu', 'no-sandbox']
        }
      }
    }
  }
}

我甚至尝试过切换' start_process"假并运行一个独立的selenium服务器但最终给了我同样的错误。如果有人有任何建议,请帮忙。谢谢

0 个答案:

没有答案
相关问题