在Protractor中运行e2e测试的错误

时间:2015-06-16 21:26:45

标签: angularjs protractor

我正在尝试在angularjs教程中运行scenario.js Protractor e2e测试,这里是https://docs.angularjs.org/tutorial。我按照蓝色框中教程第二步的说明进行操作。

如果我像他们说的那样进入angular-phonecat目录,我可以毫无错误地运行npm installnpm run update-webdrivernpm start。我安装了2.1.0版量角器,但是当我尝试运行它时,我遇到了这些错误:

npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "protractor"
npm ERR! node v0.12.4
npm ERR! npm  v2.11.1
npm ERR! code ELIFECYCLE
npm ERR! angular-phonecat@0.0.0 protractor: `protractor test/protractor-conf.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-phonecat@0.0.0 protractor script 'protractor test/protractor-conf.js'.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     protractor test/protractor-conf.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/cohenwan/Sites/angular-phonecat/npm-debug.log

我不确定应用教程的文档是否有问题,但我真的想学习如何在Protractor中进行end2end测试,但这并不是很有帮助。有什么建议?还是建议更好的学习量角器的方法?

1 个答案:

答案 0 :(得分:1)

我发现我需要在这里下载Chrome驱动程序:http://chromedriver.storage.googleapis.com/index.html?path=2.15/。我下载了mac32.zip。现在它正在发挥作用。

相关问题