量角器未连接到DevTools [英] Protractor not connected to DevTools

查看:219
本文介绍了量角器未连接到DevTools的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Chrome开发人员工具从Protractor运行时检查我的页面?当我尝试打开devtools时,从量角器中得到这个错误:

  UnknownError:断开连接:未连接到DevTools 
(会话信息:chrome = 35.0.1916.114)
(驱动程序信息:chromedriver = 2.10.267518,platform = Linux 3.5.0-49-generic x86_64)
pre>

解决方案

有一个新的暂停函数可用于打开开发工具,例如拍摄堆快照。它会暂停测试执行,直到您从命令窗口继续执行。



更多详细信息,请参阅:



要使用它,只需将以下代码添加到测试代码中:

  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:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆