Angularjs 尝试在angular js教程的步骤3中运行量角器
我无法使用量角器运行e2e测试 当我试图从运行angular phonecat应用程序代码时 它正在显示这个错误Angularjs 尝试在angular js教程的步骤3中运行量角器,angularjs,protractor,Angularjs,Protractor,我无法使用量角器运行e2e测试 当我试图从运行angular phonecat应用程序代码时 它正在显示这个错误 Starting selenium standalone server... [launcher] Running 1 instances of WebDriver [launcher] Process exited with error code 1 events.js:85 throw er; // Unhandled 'error' event
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver [launcher] Process exited with error code 1
events.js:85
throw er; // Unhandled 'error' event
^ Error: spawn java ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\no un" "protractor"
npm ERR! node v0.12.7
npm ERR!
npm v2.11.3
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/pro
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! C:\Users\xxxxx\Documents\GitHub\angular-phonecat\npm-debug.log
你安装了chrome和chrome驱动程序吗 试试这个: 在“gragrator-conf.js”中,删除“chromeOnly:true”,并放置“directConnect:true”
您可以在angular_phonecat\test中找到它,另外,在管理员模式下运行node cmd。那是我丢失的一环 这也解决了我的问题。如果其他人好奇directConnect会做什么,这里有一个解释:哇。我一直在扯我的头发在这一个,所以我在管理模式下运行了cmd提示符。我还安装了Java8,所以我不确定我刚才采取的两个步骤的解决方案是什么。