Chrome无法启动(Protractor,Ubuntu,无头)

时间:2015-05-01 06:15:42

标签: angularjs google-chrome ubuntu selenium protractor

我试图在Ubuntu 13.10(Atlassian Bamboo)盒子上无头地使用Protractor运行Chrome,但Protractor似乎无法启动Chrome。

我使用ChromeDriver 2.14,Selenium 2.45,gulp-protractor 0.0.12(量角器1.0),这是我的输出:

[05:22:55] Starting 'e2e'...
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver
ERROR - Unable to start a WebDriver session.

/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
  var template = new Error(this.message);
                 ^
UnknownError: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Linux 3.11.0-17-generic x86_64)
    at new bot.Error (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
    at Object.bot.response.checkResponse (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
    at /mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:152:24
    at /mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at notify (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    at notifyAll (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:442:7)
    at resolve (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:420:7)
    at fulfill (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:535:5)
    at /mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
==== async task ====
WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:149:22)
    at Function.webdriver.WebDriver.createSession (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:123:30)
    at new Driver (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:477:36)
    at Object.createDriver (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:453:10)
    at DirectDriverProvider.getNewDriver (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/lib/driverProviders/direct.js:68:23)
    at Runner.createBrowser (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/lib/runner.js:180:37)
    at /mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/lib/runner.js:257:21
    at _fulfilled (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/mnt/bamboo-ebs/bamboo-agent/build-dir/node_modules/gulp-protractor/node_modules/protractor/node_modules/q/q.js:826:30)
[launcher] Process exited with error code 1

对此有任何意见:)

编辑:我的量角器配置

exports.config = {
  directConnect: true,

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'chrome'
  },

  // seleniumAddress: 'http://0.0.0.0:4444',
  // add proper version number
  seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar',
  specs: ['specs/e2e/dist/*.js'],

  plugins: [{
    path: 'aurelia.protractor.js'
  }],


  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000
  }
};

0 个答案:

没有答案