【发布时间】:2015-12-30 03:38:32
【问题描述】:
我正在使用节点检查器来调试我的实习生功能测试。在功能测试中如何使用调试器? 如果我有一个看起来像的功能测试
'Sample Test' : function() {
console.log("load row grid mesh test");
return this.remote
.setFindTimeout(5000)
.setWindowSize(800, 500)
.then(pollUntil('return document.evaluate("//span[contains(@class, \'abcd\') and following-sibling::span[child::span[text() = \'App\']]]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue', 8000))
.expand("App")
.expand("Sample")
.open("SampleApp.xlsx")
.then(pollUntil('return document.evaluate( "//div[contains(@class, \'Cover\') and @style = \'display: none; top: 0px; left: 0px;\']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue', 8000))
.findAllByClassName("abc")
.getAttribute("style")
.then( function(style) {
//I am able to put a debugger here without isssue
assert.isTrue(style.length < 32);
assert.notStrictEqual(style[0].indexOf("top: 0px;"), -1);
assert.notStrictEqual(style[25].indexOf("top: 480px;"), -1);
}).end()
debugger // I NEED TO PAUSE HERE
.findByXpath('//div[@class = \'abc\']//span[text() = \'AppleSample\']')
.moveMouseTo().end()
不确定如何放置调试器。我是新来的实习生。任何帮助将不胜感激
【问题讨论】:
-
您是否尝试过在您选择的浏览器中运行您的客户端代码并使用浏览器的调试工具?
标签: intern node-inspector