?如果不是,在推荐答案Once feat(expectedConditions) 在(可能是量角器 1.7),你可以这样做:Once feat(expectedConditions) is in (probably protractor 1.7), you can do:var EC = protractor.ExpectedConditions;var e = element(by.id('xyz'));browser.wait(EC.presenceOf(e), 10000);expect(e.isPresent()).toBeTruthy();但请注意,如果您正在使用 Angular 应用程序并且您的测试需要这些条件等待,则这是您正在做的事情的一个很大的危险信号,因为量角器应该本地处理等待.Please note though, if you're working with an Angular app and your test requires these conditional waits, it's a big red flag for what you're doing, as protractor should handle waits natively. 这篇关于量角器中的预期条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-12 16:42