I've been through some problems with my waits in protractor. For example, I am navigating between my pages which has a loading, then I need to click a button. But, sometimes, the button appears before the loading disappear. So protractor click at this button, behind the loading, and the button has no action, because the loading was at the screen. So, How can I use the waits for this situation?
I've been trying:
EC.invisibilityOf(loading)
.then(() => {
EC.elementToBeClickable(button)
.then(() => {
browser.actions().mouseMove(button).click().perform();
});
});
});
Did you tried to make the browser sleep a little before the click ?
browser.sleep(2000);