【问题标题】:How can I wait until a loading mask disappears in protractor?我怎样才能等到加载蒙版在量角器中消失?
【发布时间】:2020-06-09 09:25:56
【问题描述】:

我总是对这个加载蒙版有问题,因为有时它需要更长的时间才能消失,而有时它需要的时间更短。只要比正常时间长,测试就会失败。

有没有可以避免这个问题的函数?

【问题讨论】:

    标签: node.js protractor


    【解决方案1】:

    如果有帮助,试试这个:

    $$('.cMiddle tr .item').get(5).isPresent().then(function(present) {
                        if (present) {
                            $$('.cMiddle tr .item').get(5).getText().then(function(dtsStatus) {
                                fs.appendFile('D:/CODE/script/script/testscript/output/Status.html', dtsStatus + '\n', 'utf8');
                            })
                        } else {
                            fs.appendFile('D:/CODE/script/script/testscript/output/Status.html', '\n', 'utf8');
                        }
                    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-03
      • 2011-12-14
      • 2016-05-19
      • 2019-10-30
      • 1970-01-01
      • 2020-09-13
      相关资源
      最近更新 更多