0
獲取的錯誤,我已經安裝了呼嚕聲與此命令java:與咕嚕量角器
npm install grunt-run-java --save-dev
,然後我把grunt.loadNpmTasks('grunt-run-java');
到我的呼嚕聲文件。之後,當我嘗試運行grunt量角器時,會出現以下錯誤:
Running "protractor:chrome" (protractor) task
WARNING - You have specified both capabilites and multiCapabilities. This will result in capabilities being ignored
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at exports._errnoException (util.js:856:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:452:9)
at process._tickCallback (node.js:366:17)
>> events.js:141
>> throw er; // Unhandled 'error' event
>> ^
>>
>> Error: spawn java ENOENT
>> at exports._errnoException (util.js:856:11)
>> at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
>> at onErrorNT (internal/child_process.js:344:16)
>> at doNTCallback2 (node.js:452:9)
>> at process._tickCallback (node.js:366:17)
>> Test failed but keep the grunt process alive.
如何防止此錯誤?
Java任務需要在其他任務之前運行嗎?我猜測他們運行異步 – danday74
不確定與量角器的關係是什麼,你是從grunt啓動硒服務器?也許試試'grunt-protractor-runner'? – cnishina