当报告准备下载时,是否需要等待 Protractor 等待下载弹出窗口出现,而不依赖超时,因为某些报告可能比其他报告花费更长的时间?
browser.driver.wait(
this.isVisible(locator)
, 35000, locator_css + ' took too long to be on the DOM.')
.then(function() {
return locator.click();
});
}
最佳答案
我更愿意等待下载对话框可见:
var EC = protractor.ExpectedConditions;
browser.wait(EC.visibilityOf(DownloadDialog), 7000, "下载对话框未显示 - 超时");
关于javascript - 在 Protractor 中,我怎样才能等到弹出窗口出现而不依赖超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57398631/