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
3 Replies
genetic-orange
genetic-orange11mo ago
attached is some demo code
genetic-orange
genetic-orange11mo ago
genetic-orange
genetic-orange11mo 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

Did you find this page helpful?