im trying to download a zip file with the code:
async downloadZipFile( ) {
await this.thankYouBtn.waitFor( { state: ‘attached’ }, { timeout: 5000 } );
const downloadPromise = this.page.waitForEvent( ‘download’, { timeout: 10000 } );
await this.closeOneTrustCookiePopup();
await this.thankYouBtn.click();
const download = await downloadPromise;
await download.saveAs( ‘.’ + download.suggestedFilename() );
}
and im getting the error : Error: download.saveAs: File not found on disk. Check download.failure() for details.
and the a tag contains attribute: download=true
i want to verify the download of the zip file, and im expecting that the download will work without that error
Moshe Avitan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.