2014-08-28 70 views
1

我正在嘗試在Centos 6.5,Chrome版本33.0.1750.146,npm 1.4.3和節點版本v0.10.31上運行angular-phonecat tutoral。我試圖運行量角器測試:量角器超時在Centos上打開Chrome驅動程序

npm run protractor 

但我得到這個錯誤,我該如何解決它?

> [email protected] preprotractor /home/david/IdeaProjects/angular-phonecat 
> npm run update-webdriver 


> [email protected] preupdate-webdriver /home/david/IdeaProjects/angular-phonecat 
> npm install 

npm WARN package.json [email protected] No README data 

> [email protected] postinstall /home/david/IdeaProjects/angular-phonecat 
> bower install 


> [email protected] update-webdriver /home/david/IdeaProjects/angular-phonecat 
> webdriver-manager update 

selenium standalone is up to date. 
chromedriver is up to date. 

> [email protected] protractor /home/david/IdeaProjects/angular-phonecat 
> protractor test/protractor-conf.js 

Using ChromeDriver directly... 

/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:87 
     Error('Timed out waiting for the WebDriver server at ' + url)); 
    ^
Error: Timed out waiting for the WebDriver server at http://127.0.0.1:50977/ 
at Error (<anonymous>) 
at onResponse (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:87:11) 
at /home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:42:21 
at /home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/http/http.js:96:5 
at ClientRequest.<anonymous> (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:136:7) 
at ClientRequest.emit (events.js:95:17) 
at Socket.socketErrorListener (http.js:1547:9) 
at Socket.emit (events.js:95:17) 
at net.js:440:14 
at process._tickCallback (node.js:419:13) 
==== async task ==== 
WebDriver.createSession() 
at Function.webdriver.WebDriver.acquireSession_ (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:49) 
at Function.webdriver.WebDriver.createSession (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:111:30) 
at Object.createDriver (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:460:30) 
at ChromeDriverProvider.getDriver (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/lib/driverProviders/chrome.js:67:27) 
at /home/david/IdeaProjects/angular-phonecat/node_modules/protractor/lib/runner.js:221:35 
at _fulfilled (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/q/q.js:797:54) 
at self.promiseDispatch.done (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/q/q.js:826:30) 
at Promise.promise.promiseDispatch (/home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/q/q.js:759:13) 
at /home/david/IdeaProjects/angular-phonecat/node_modules/protractor/node_modules/q/q.js:525:49 
+0

你肯定有不便運行在通過'http://127.0.0.1:50977'? – alecxe 2014-08-28 20:51:35

+0

我以爲這是由命令旋轉?應用程序站點在端口8000 – 2014-08-28 22:32:27

+0

上,您可能需要首先運行'webdriver-manager start'來啓動硒服務器(如果沒有,請運行'webdriver-manager update')。閱讀更多關於它[這裏](https://github.com/angular/protractor/blob/master/docs/tutorial.md) – nilsK 2014-08-29 09:26:47

回答

相關問題