调试protactor(有/无webstorm) [英] debugging protactor (with / without webstorm)
问题描述
所以我开始接触量角器,我想调试我的测试code:
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:\\ SRC \\ APPS \\ J1-test.module>量角器调试conf.js结果
&LT;调试器侦听端口5858结果
连接...好结果
用C突破:\\用户\\ J□\\应用程序数据\\漫游\\故宫\\ node_modules \\量角器\\ lib目录\\ cli.js:7结果
5 *从config命令行选项覆盖值的值。结果
6 * /结果
7'使用严格的';结果
8结果
9 //咖啡在这里需要启用写在咖啡脚本配置文件。结果
调试>续结果
&LT; ------------------------------------结果
&LT; PID:9756(容量:镀铬#1)结果
&LT; ------------------------------------结果
&LT;调试器侦听端口5858结果
调试>
D:\src\apps\j1-test.module>protractor debug conf.js
< debugger listening on port 5858
connecting... ok
break in C:\Users\j\AppData\Roaming\npm\node_modules\protractor\lib\cli.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>
,就是这样。不管有多少种类型'续',没有任何反应。结果
我试着按照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文件\\的NodeJS \\ node.exe--debug-BRK = 2259 C:\\用户\\ J□\\应用程序数据\\漫游\\故宫\\ node_modules \\量角器\\ LIB \\ cli.js
conf.js结果
调试器侦听端口2259结果
PID:2708(容量:镀铬#1)结果
调试器侦听端口2259
"C:\Program Files\nodejs\node.exe" --debug-brk=2259 C:\Users\j\AppData\Roaming\npm\node_modules\protractor\lib\cli.js conf.js
debugger listening on port 2259
PID: 2708 (capability: chrome #1)
debugger listening on port 2259
)。
我在Windows上使用节点0.10.26(64位)8
I'm using node 0.10.26 (64 bit) on windows 8
想法吗?
推荐答案
这是一个量角器问题,这应该已经得到解决:
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
编辑:在0.20.0版发布了! (0.20.1 Windows用户)。请参见量角器的changelog 。
Released in 0.20.0 version! (0.20.1 for Windows users). See Protractor changelog.
这篇关于调试protactor(有/无webstorm)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!