我正在使用带有异步/等待的量角器运行测试,并尝试使用调试器。输入提示node --inspect-brk bin/protractor conf.js
比在Chrome中打开“ chrome:// inspect /#devices”(显示“ bin /量角器文件:/// inspect”),单击“检查”,然后在promt中出现以下错误:
Debugger listening on ws://127.0.0.1:9229/85c1f4a4-3048-4c73-b42f-61a5f078ba7e
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'C:\Users\harmatii\Protractor\calbar\bin\protractor'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Waiting for the debugger to disconnect...
答案 0 :(得分:1)
看起来像protractor
和conf.js
的路径中的问题。
尝试提供指向protractor
和conf.js
的正确路径。
应该是这样的:
node --inspect-brk node_modules/protractor/bin/protractor /users/harmatii/Protractor/conf.js