相关疑难解决方法(0)

AngularJS量角器E2E测试中的页面对象

处理用于为AngularJS编写Protractor E2E测试的Page Objects模型的正确方法是什么?我觉得我应该把它们写在单独的文件中(比如homepage.js,page2.js等)然后以某种方式将它们包含在像模块这样的规范中.但是,我不知道如何注射它们.将不胜感激任何建议.谢谢!

javascript angularjs angularjs-e2e protractor

12
推荐指数
1
解决办法
8834
查看次数

调试protactor(有/没有webstorm)

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

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);

});
Run Code Online (Sandbox Code Playgroud)

});

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

D:\ src\apps\j1-test.module> protractor debug conf.js
<debugger侦听端口5858
连接... ok
中断C:\ Users\j\AppData\Roaming \npm \node_modules\protractor\lib\cli.js:7
5*命令行选项中的值会覆盖配置中的值.
6*/
7'使用严格';
8
9 //这里需要咖啡来启用以咖啡脚本编写的配置文件.
debug> cont
<------------------------------------ …

debugging node.js angularjs protractor

4
推荐指数
1
解决办法
5411
查看次数