I am currently experiencing synchronization issues in the 'it' block of my code. The following snippet illustrates the problem:
it('Some Download Operation',function()
{
console.log("before");
myobj.clickOnDownloadBtn();
console.log("after download click");
browser.driver.sleep(5000);
var enter = browser.actions().sendKeys(protractor.Key.ENTER);
enter.perform();
console.log("after enter btn");
});
The output I am receiving is as follows:
before
after download click
after enter btn
//Then the click on PO Object's 'myobj.clickOnDownloadBtn()' operation.
Please advise me on the issue and provide a solution as soon as possible.