2/1/2024 0 Comments Node puppeteer download freeSpecifies wether it allows downloading multiple files or notĪwait page. Create scenarios with different contexts for different users and run them against your server, all in one test. Test scenarios that span multiple tabs, multiple origins and multiple users. My question is, is there a way to wait for a download to complete using Node+Puppeteer? I have tried using waitUntil: 'networkidle0 and networkidle2 but both seem to wait forever.Ĭode below: const path = require('path') Ĭonst browser = await puppeteer.launch() This makes Playwright free of the typical in-process test runner limitations. I have a script made using node.js and puppeteer which downloads a file from a button (which doesn't redirect to a url), so right now i'm using await await page.waitForTimeout(1000) to wait for the download to complete but it has a few flaws, such as:ĭepending on the connection, the download might take more than 1000ms to finish, as well as it might take less, which wouldn't make sense to wait more than what took to finish the download.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |