【问题标题】:Errors running e2e tests in Protractor在 Protractor 中运行 e2e 测试时出错
【发布时间】:2015-06-16 21:26:45
【问题描述】:

我正在尝试在 angularjs 教程中运行场景.js Protractor e2e 测试,此处为 https://docs.angularjs.org/tutorial。我正在按照蓝框中教程步骤二的说明进行操作。

如果我像他们说的那样 cd 进入 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 中进行端到端测试,但这并没有帮助。有什么建议吗?或者有更好的学习量角器方法的建议?

【问题讨论】:

    标签: angularjs protractor


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2018-01-16
      • 1970-01-01
      • 2018-01-23
      • 1970-01-01
      • 2018-01-31
      • 2016-02-10
      • 1970-01-01
      • 2014-01-19
      • 1970-01-01
      相关资源
      最近更新 更多