debugging - 如何从调试器恢复而不中断 Protractor 中的整个测试?

标签 debugging gruntjs protractor

我正在使用 Protractor 编写测试。如果我在测试中输入以下代码,我就可以进入调试器:

browser.pause();

但是,我无法退出调试器并恢复测试执行。 根据this documentation :

When you finish debugging, exit by pressing Ctrl-C. Your tests will continue where they left off, using the same browser.

实际上,即使调试器本身在暂停时也告诉我同样的信息:

------- WebDriver Debugger -------
 ready

press c to continue to the next webdriver command
press d to continue to the next debugger statement
type "repl" to enter interactive mode
type "exit" to break out of interactive mode
press ^C to exit

这一切听起来不错,但是当我尝试 Ctrl-C 时,它会中断整个测试。我做错了什么?

我正在 Windows 7 上使用 grunt-protractor-runner@1.2.1 运行 Protractor 测试。

最佳答案

正如消息中所述,您可以使用

press d to continue to the next debugger statement

整个套件将继续执行,直到遇到另一个调试器调用(因此您必须再按“d”一次)或直到套件的最后。

注意:按 d 实际上意味着您输入字母“d”并按“Enter”

关于debugging - 如何从调试器恢复而不中断 Protractor 中的整个测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31406948/

相关文章:

java - java中如何快速注释几行代码?

javascript - 使用 imagemin-contrib (Grunt) 进行图像压缩

javascript - Protractor 计数元素并存储整数

angularjs - 如何使用 Angular 的 Protractor 0.24 版本在 <select> 列表中选择一个值?

c++ - 将(手动)从 uint32_t 转换为 4 个字符

node.js - Node.js 上的条件断点

java - 浮点计算一直返回0.0

ruby - Mac OS Sierra 10.12.6 更新后 gem 安装 compass 错误

css - grunt concat_css 禁用输出

javascript - 使用变量时,ExecuteScript 不适用于 localStorage