I\'m new on protractor, and I\'m trying to implement an e2e test. I don\'t know if this is the right way to do this, but... The page that I want to test is not a full angula
browser.driver.wait(function() {
return browser.driver.isElementPresent(by.xpath("//a[@href='#/contacts']"));
});
This works for me too (without the timeout param)..
for more information, see http://angular.github.io/protractor/#/api?view=webdriver.WebDriver.prototype.wait
I finally find out...
var waitLoading = by.css('#loading.loader-state-hidden');
browser.wait(function() {
return ptor.isElementPresent(waitLoading);
}, 8000);
expect(ptor.isElementPresent(waitLoading)).toBeTruthy();
var openContact = by.xpath("//a[@href='#/contacts']");
element(openContact).click();
With this protractor could wait for that element until it loading page disappears. Thanks for those who tried to help XD.