My test downloads a file and then clicks a button. The click on the button takes effect (opening a sidebar) 40 secs after. If I disable the downloading code in the app (making the bottom download bar not to appear), the sidebar opens right away without delay.
My question is roughly the same as this one . The question has no solution and is quite old, that's why I ask again.
What I have tried:
browser.manage().timeouts().implicitlyWait(100);
browser.ignoreSynchronization = true;
before downloading (and browser.ignoreSynchronization = false;
after)await browser.waitForAngularEnabled(false);
before downloading (and await browser.waitForAngularEnabled(true);
after)browser.executeScript('window.stop();');
after downloadingconst wins = await browser.driver.getAllWindowHandles(); await browser.switchTo().window(wins[0]);
after downloadingawait browser.switchTo().activeElement();
after downloadingconst bd = element(by.css("body")); await browser.actions().mouseMove(bd, { x: 0, y: 0 }).click().perform();
after downloadingbrowser.actions().sendKeys(protractor.Key.ESCAPE).perform();
after downloadingI don't know what is happening, that's why I tried various (and maybe unrelated with the cause) things.
Thank you.
After searching and trying various things, solved with
browser.controlFlow().execute(function () {
browser.ignoreSynchronization = false;
});
before downloading and
browser.controlFlow().execute(function () {
browser.ignoreSynchronization = true;
});
after.
Can anybody explain me why?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.