【问题标题】:Trying to run protractor in Step 3 in angular js tutorial尝试在角度 js 教程的第 3 步中运行量角器
【发布时间】:2015-07-30 19:56:45
【问题描述】:

我无法使用量角器运行 e2e 测试

当我尝试从 https://docs.angularjs.org/tutorial 运行 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            
^ 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

【问题讨论】:

    标签: angularjs protractor


    【解决方案1】:

    您安装了 chrome 和 chrome 驱动程序吗?

    试试这个:

    在 'protractor-conf.js' 中删除 'chromeOnly: true,' 并放入 'directConnect: true,'。

    你可以在 angular_phonecat\test 中找到它

    【讨论】:

    【解决方案2】:

    另外,在管理员模式下运行 node cmd。那是我缺少的链接!

    【讨论】:

    • 哇。我一直在扯这个头发,所以我在管理员模式下运行了一个 cmd 提示符。我还安装了 Java 8,所以我不确定我刚刚采取的两个步骤的解决方案是什么。
    猜你喜欢
    • 2015-09-15
    • 2018-10-02
    • 2016-05-23
    • 2015-03-18
    • 1970-01-01
    • 2016-08-26
    • 2019-02-11
    • 2014-06-23
    • 1970-01-01
    相关资源
    最近更新 更多