0
我有一個量角器測試,需要登錄後某個面板不存在。我的代碼在下面,但每次執行時,量角器都會掛起,然後再失敗。檢查量角器中是否存在元素
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
it('The team overlay page should not be present when another user logs in.', function() {
loginPage.login(user.username, user.password);
expect(element(by.css('div.panel#myPanel')).isPresent()).toBe(false);
});
我也使用.Count中()嘗試,但它也做了同樣的事情。與上面相同的錯誤。
expect(element.all(by.css('div.panel#myPanel')).count()).toBe(0);
謝謝。當它應該存在並且它沒有任何問題時,我測試了它。 :)我會先嚐試你的解決方案。 – jaydoe