【问题标题】:How to resume from debugger without interrupting the entire test in protractor?如何从调试器恢复而不中断量角器中的整个测试?
【发布时间】:2015-07-14 12:43:43
【问题描述】:

我正在使用量角器编写测试。如果我将以下代码放入我的测试中,我就可以进入调试器:

browser.pause();

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

完成调试后,按 Ctrl-C 退出。您的测试将使用相同的浏览器从中断处继续。

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

------- 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 运行量角器测试。

【问题讨论】:

    标签: debugging gruntjs protractor


    【解决方案1】:

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

    按 d 继续下一条调试器语句

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

    注意:press d 实际上表示您输入字母“d”并按“Enter”

    【讨论】:

    • 哎呀,显然我看不懂.. 'd' 正是我要找的,谢谢!
    • 如果您来自 2018 年,请使用 ^D (CTRL+D)。
    猜你喜欢
    • 1970-01-01
    • 2013-12-06
    • 1970-01-01
    • 1970-01-01
    • 2018-09-07
    • 2019-09-22
    • 1970-01-01
    • 2015-02-26
    • 2022-01-12
    相关资源
    最近更新 更多