![]() if finish than return true if fail clickĬonst dm = document.querySelector('downloads-manager').shadowRootĬonst firstItem = dm.querySelector('#frb0')Ĭonst thatArea = ('.controls') ![]() monitoring the state of the first download item PUPPETEERPRODUCTfirefox npm install PUPPETEERPRODUCTfirefox yarn install javascript node. But you can easily adapt it to 'infinite threads' by iterating through all download items ( #frb0~ #frbn) in that page, well, take care of your network:) dmPage = await browser.newPage()Īwait your_download_button.click() // start downloadĪwait dmPage.bringToFront() // this is necessary Run 'PUPPETEERPRODUCTfirefox npm install' or 'PUPPETEERPRODUCTfirefox yarn install' to download a supported Firefox browser binary. This example is 'single thread' currently, because it's only monitoring the first item appear in the download manager page. This solution can be very easily to auto restart a failed download using chrome's own feature My solution is to use chrome's own chrome://downloads/ page to managing download files. Puppeteer quick start Install and run Puppeteer. ![]() It also has 'smarter' locator, which examine selectors every time before click() Steps to reproduce Tell us about your environment: Puppeteer version: 1.18.1 Platform / OS version: Win 10 Node.js version: v8.12.0 What steps will reproduce the problem Please include code that. Get started Overview of Puppeteer An explanation of what Puppeteer is and the things it can do. Use Playwright to get away from this mass.
0 Comments
Leave a Reply. |