[英]how to navigate css element in protractor based e2e tests, using Xpath?
[英]Protractor debugging using ng e2e
我可以通过单独运行以下命令来调试 e2e 测试 -
node --inspect-brk .\node_modules\protractor\bin\protractor .\e2e\protractor.conf.js
但是,我会单独运行'ng e2e'以及上面的调试命令,这会打开两个浏览器,一个用于 e2e,另一个用于调试 e2e。 我想在调试模式下使用 package.json 中的配置/命令在调试模式下立即运行 e2e 测试。
我遇到了下面的命令来让它与 ng 一起运行 -
node --inspect-brk ./node_modules/\@angular/cli/bin/ng e2e ./protractor.conf.js
我在 package.json 中关注 -
"e2e": "ng e2e -c=integration --suite e2e --webdriverUpdate=false"
我试图按照以下方式使用调试命令 -
"e2e-debug": "node --inspect-brk .\\node_modules\\@angular\\cli\\bin\\ng e2e -c=integration --suite e2e --webdriverUpdate=false" .\\e2e\\protractor.conf.js
在点击chrome://inspect/#devices并检查时,它停在 ng 的第一行。 我后来得到了Unknown option: '.\\e2e\\protractor.conf.js'错误并且执行停止了。
我从上面的命令中删除了.\\e2e\\protractor.conf.js并尝试如下 -
"e2e-debug": "node --inspect-brk .\\node_modules\\@angular\\cli\\bin\\ng e2e -c=integration --suite e2e --webdriverUpdate=false"
为此,在检查时,它停在 ng 的第一行,后来它从未停在任何存在调试器的规范文件中。 它完成了运行测试,而不会在任何地方停下来。
知道如何在调试时使用带有选项的 ng e2e 命令吗?
我写了一篇关于调试量角器测试的文章。 如果您还没有提到,请看一看。 https://medium.com/@ganeshsirsi/how-to-debug-protractor-tests-in-visual-studio-code-e945fc971a74
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.