I am trying to download PDFs from this link. On clicking Read PDF, it opens a new window with PDF in it. On clicking the download button, it opens a dialog box and asks the user to specify the location to save the file.
After opening The webpage of the concerned e-book, I want to automate the following steps:
- Read PDF is clicked. The window is opened in new window.
- Download icon is clicked. Dialog box appears and asks to specify the file name and the location.
- The default name provided is kind of gibberish. So, the meaningful name like Frontmatter, Contents etc. is paseted there which is mentioned ahead of the download link and has been copied previously.
I want to automate above steps for a lot of ebooks. Had the links been in non-javascript form, it would have been easy to download using some kind of download manager.
(PS : The given webpage may not have all the Read PDF links activated but they are all active behind the proxy at my location.)