量角器未连接到DevTools [英] Protractor not connected to DevTools
问题描述
如何使用Chrome开发人员工具从Protractor运行时检查我的页面?当我尝试打开devtools时,从量角器中得到这个错误:
UnknownError:断开连接:未连接到DevTools
pre>
(会话信息:chrome = 35.0.1916.114)
(驱动程序信息:chromedriver = 2.10.267518,platform = Linux 3.5.0-49-generic x86_64)
解决方案有一个新的
暂停
函数可用于打开开发工具,例如拍摄堆快照。它会暂停测试执行,直到您从命令窗口继续执行。
更多详细信息,请参阅:
- http://angular.github.io /protractor/#/api?view=Protractor.prototype.pause
- http://ng-learn.org/2014/04/Pausing-Protractor/
要使用它,只需将以下代码添加到测试代码中:
browser.pause();
准备好继续测试后,输入
d
。,然后在暂停的命令窗口/终端中输入
输入How can I use the Chrome developer tools to inspect my page while it's running from Protractor? When I try to open the devtools, I get this error from protractor:
UnknownError: disconnected: not connected to DevTools (Session info: chrome=35.0.1916.114) (Driver info: chromedriver=2.10.267518,platform=Linux 3.5.0-49-generic x86_64)
解决方案There is a new
pause
function that can be used to open the dev tools and e.g. taking a heap snapshot. It pauses the test execution until you continue the execution from the command window.More details here:
- http://angular.github.io/protractor/#/api?view=Protractor.prototype.pause
- http://ng-learn.org/2014/04/Pausing-Protractor/
To use it, simply add the following to your test code:
browser.pause();
Once you're ready to continue the test, type in d
followed by Enter
in the paused command window/terminal.
这篇关于量角器未连接到DevTools的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!