How can I wait for a condition?

前端 未结 8 771
礼貌的吻别
礼貌的吻别 2020-12-07 15:39

I\'m new on protractor, and I\'m trying to implement an e2e test. I don\'t know if this is the right way to do this, but... The page that I want to test is not a full angula

8条回答
  •  情书的邮戳
    2020-12-07 16:23

    Thanks to answers above, this was my simplified and updated usage

    function waitFor (selector) {
      return browser.wait(function () {
        return browser.isElementPresent(by.css(selector));
      }, 50000);
    }
    

提交回复
热议问题