I am trying to use Chrome console to download a series of files in a faster way using a for loop. It is a public resource, but its website is old and does not support multiple files download at the same time and there are hundreds of them…
The thing is, when downloading the file, Chrome seems to assign a random name to the file – how can I rename the file that I am going to download in the console?
Also, I used getElementByTagName to get the button inside the page, however I cannot get the .click() or .submit() work. Are there any method to trigger a click on the button?
If you are downloading a file for which you are using a link <a> then set the “download” attribute. It will be used as default download name
I know it’s not quite related with this topic, but finally I completed the multiple files downloading using wget loop in bash.
if you want to download the file u can use console.save from below
http://bgrins.github.io/devtools-snippets/#console-save
just use console.save(yourObjectHere)