Protractor: wait method isn't work

后端 未结 3 957
挽巷
挽巷 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:03

    You need to handle the wait timeout error:

    browser.wait(EC.presenceOf(balloon_warning), 3000).then(function () {
        // success handler
    }, function (error) {
        expect(true).toBe(false);
    });
    

提交回复
热议问题