My E2E testing is to fill some details in a page, click a button to go to the next page and verify whether we reached the next page.Now I am able to move to the next page and scroll down but after that I couldn't select an element based on id, name or css it fails with the above error.
Why do we get "timeout Aysnc callback was not invoked" error ?
I have seen so many questions asking for same error but none of the answers is working in my case.PFB the code.
beforeEach(() => {
browser.manage().window().setSize(BROWSER_WIDTH, BROWSER_HEIGHT);
browser.get('index.html#/banking');
bankingDetails = require('./banking.page');
});
fit('should navigate to check panel for source type = saving and one ' +
'savings checkbox was selected', () => {
var checkPanelDetails = require('./check.page');
bankingDetails.fillBankingDetails(true, true);
bankingDetails.bankingWeiterButton.click();
browser.executeScript('window.scrollTo(0, 700);');
var isPresent = browser.wait(function () {
return checkPanelDetails.isVisible();
});
expect(isPresent).toBeTruthy();
});
check.page
var CheckPanel = function () {
this.checkPanel = element(by.name('check.confirm'));
this.isVisible = function () {
return this.checkPanel.isPresent();
};
};
module.exports = new CheckPanel();
Note: I am using jasmine(2.4.1) and protractor(2.3.0)