Protractor waiting for element to be in DOM

前端 未结 3 1244
生来不讨喜
生来不讨喜 2020-12-05 03:50

I have been having some trouble using Protractor. I have a really weird ui-router state where its hard to go off of other elements to start working with the page. Is there a

3条回答
  •  天涯浪人
    2020-12-05 04:50

    You should be able to use browser.wait together with the presenceOf ExpectedCondition:

    var until = protractor.ExpectedConditions;
    browser.wait(until.presenceOf(elem), 5000, 'Element taking too long to appear in the DOM');
    

提交回复
热议问题