Navigation to download handling
a better way to handle navigations that directly cause downloads such as the download button on this page: https://dca-global.org/file/view/12756/interact-case-study-cedaci
Playwright throws an error along the lines of net:ERR_BINDING_ABORTED
The best solution I have come up with is to set up a promise in a preNavigation hook that listens for download events and then handle them in the errorHandler but this obviously isnt ideal
Interact Case Study CEDaCI : DCA Global (Data Centre Alliance)
Data Centre Alliance
3 Replies
genetic-orange•11mo ago
attached is some demo code
genetic-orange•11mo ago
genetic-orange•11mo ago
just realised even this doesnt work when operating headlessley. ive got the same idea working headlessley where i detect a download in the pre-nav hook and in the error handler re-run the request using got-scraping