Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Download a PDF file in Playwright instead of opening it in a new tab when clicking on its link
Post
Download a PDF file in Playwright instead of opening it in a new tab when clicking on its link
My organisation uses Moodle as their online e-learning system on which teachers share resources, and oftentimes numerous documents that we need to view/download are posted there. The default way of attaching documents (which is what everyone ends up using) requires the recipient to ctrl-click on the link, move to the tab just opened and ctrl+S for every PDF shared, which isn't exactly a 'git clone-experience'.
To get over this I tried using Playwright, famous for being able to automatically perform practically any useful action a human would, but everything I've tried has always caused a download promise to hang after the PDF opened in a new tab.

1 comment thread