2

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)

Raphael
  • 1,738
  • 2
  • 27
  • 47
  • take a look into : http://stackoverflow.com/questions/37070680/timed-out-waiting-for-asynchronous-script-result-while-executing-protractor-scri and this also may help http://stackoverflow.com/questions/37161258/can-the-time-out-issue-be-the-consequence-of-browser-sleep-and-browser-waitfor – Emna Ayadi May 14 '16 at 13:07

1 Answers1

0

Here is a link from jasmine Asynchronous_Support that help me understand time out problems. Hope that can help you,

  describe("long asynchronous specs", function() {
        beforeEach(function(done) {
          done();
        }, 10000);
        });
Emna Ayadi
  • 2,430
  • 8
  • 37
  • 77