2017-01-09 121 views
1

開始我有錯誤錯誤:ChromeDriver並未在5000毫秒

Error: ChromeDriver did not start within 5000ms

我具體GitLab CE亞軍

,試圖測試電子應用與SPECTRON時。

錯誤堆棧:

1) Test Example "before each" hook for "opens a window": 
    Error: ChromeDriver did not start within 5000ms 
     at Error (native) 
     at node_modules/spectron/lib/chrome-driver.js:63:25 
     at Request._callback (node_modules/spectron/lib/chrome-driver.js:120:23) 
     at self.callback (node_modules/request/request.js:186:22) 
     at Request.onRequestError (node_modules/request/request.js:845:8) 
     at Socket.socketErrorListener (_http_client.js:310:9) 
     at emitErrorNT (net.js:1278:8) 
     at _combinedTickCallback (internal/process/next_tick.js:74:11) 
     at process._tickDomainCallback (internal/process/next_tick.js:122:9) 

    2) Test Example "after each" hook for "opens a window": 
    Error: Application not running 
     at Error (native) 
     at Application.stop (node_modules/spectron/lib/application.js:56:48) 
     at Context.<anonymous> (test/startup/title-test.js:33:20) 

我之前腳本是:

before_script: 
    - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR 
    - set -xe 
    - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 
    - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list 
    - apt-get update -yqqq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y google-chrome-stable xvfb 
    - chmod 0777 ./node_modules/.bin/mocha 
    - export {no_proxy,NO_PROXY}="127.0.0.1" 
    - apt-get install xvfb libxtst6 libxss1 libgtk2.0-0 -y 
    - apt-get install libnss3 libasound2 libgconf-2-4 -y 

這是一樣的前一份工作亞軍了,但增加了 - export {no_proxy,NO_PROXY}="127.0.0.1",因爲這是一個解決方案(但沒」爲我工作)。

我能做些什麼來改變這種情況?

回答

0

我剛剛移除那個跑步者,並開始新的一個。 New Runner在開始時下載了Spectron和ChromeDriver,並且Chrome一直在運行。