Protractor: wait method isn't work

后端 未结 3 929
挽巷
挽巷 2021-01-06 18:13

I try to use wait() method instead sleep(), but it isn\'t working. I had code:

 browser.actions().click(filter_field).perform();
 browser.sleep(3000);
 if (b         


        
3条回答
  •  难免孤独
    2021-01-06 19:13

    Finally I found one more solution:

    browser.wait(function () {
       return balloon_info.isPresent();
    }, 3000).then(function () {
       // success handler
    }).thenCatch(function () {
       expect(true).toBe(false);
    });
    

提交回复
热议问题