调试proctor(带/不带webstorm) [英] debugging protactor (with / without webstorm)

查看:17
本文介绍了调试proctor(带/不带webstorm)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我从量角器开始,我想调试我的测试代码:

So I'm starting out with protractor, and I want to debug my test code:

describe('stuff', function(){

it('should find the specs item, and its empty', function(){
    browser.debugger();
    gotoHome();
    var allItems = element.all('li in model.tags');
    var specsDashboardElement;
    for (var i=0 ; i < allItems.length; ++i) {
        var elem = allItems[i];
        var text = elem.findElement(by.css('.li-title').getText()); // does this even work?? dunno
        if (text == "Specs")
            specsDashboardElement = elem;
    }

    expect(specsDashboardElement.isDisplayed()).toBe(true);

});

});

我已遵循 这些说明,但这是我在 node.js 调试器控制台上看到的输出:

I've followed these instructions, but this is the output I see on the node.js debugger console:

D:srcappsj1-test.module>量角器调试conf.js
<侦听端口 5858 的调试器
正在连接...好的
中断 C:UsersjAppDataRoaming pm ode_modulesprotractorlibcli.js:7
5 * 命令行选项中的值会覆盖配置中的值.
6 */
7 '使用严格';
8
9//这里需要 Coffee 来启用用 coffee-script 编写的配置文件.
调试>续
<------------------------------------
<PID:9756(功能:chrome #1)
<------------------------------------
<侦听端口 5858 的调试器
调试>

D:srcappsj1-test.module>protractor debug conf.js
< debugger listening on port 5858
connecting... ok
break in C:UsersjAppDataRoaming pm ode_modulesprotractorlibcli.js:7
5 * Values from command line options override values from the config.
6 */
7 'use strict';
8
9 // Coffee is required here to enable config files written in coffee-script.
debug> cont
< ------------------------------------
< PID: 9756 (capability: chrome #1)
< ------------------------------------
< debugger listening on port 5858
debug>

就是这样.无论我输入多少种cont",都不会发生任何事情.
我尝试按照 WebStorm 中的调试说明进行操作,结果大致相同(WebStorm 调试控制台上的输出:

and that's it. no matter how many types I type 'cont', nothing happens.
I've tried following the instructions for debugging in WebStorm, with much the same result (output on the WebStorm debug console:

"C:Program Files odejs ode.exe" --debug-brk=2259 C:UsersjAppDataRoaming pm ode_modulesprotractorlibcli.jsconf.js
调试器侦听端口 2259
PID:2708(功能:chrome #1)
调试器监听 2259 端口

"C:Program Files odejs ode.exe" --debug-brk=2259 C:UsersjAppDataRoaming pm ode_modulesprotractorlibcli.js conf.js
debugger listening on port 2259
PID: 2708 (capability: chrome #1)
debugger listening on port 2259

).

我在 Windows 8 上使用节点 0.10.26(64 位)

I'm using node 0.10.26 (64 bit) on windows 8

有什么想法吗?

推荐答案

这是 Protractor 问题,现在应该修复:

That was a Protractor issue, which should be fixed now:

已修复 - 下个版本应该会发布.感谢大家的耐心等待."- @juliemr

"Fix is in - should be out next release. Thanks for your patience, everyone." - @juliemr

来自 GitHub 问题 #552

在 0.20.0 版本中发布!(Windows 用户为 0.20.1).请参阅 量角器更改日志.

Released in 0.20.0 version! (0.20.1 for Windows users). See Protractor changelog.

这篇关于调试proctor(带/不带webstorm)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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