VBA download file from website - popup window
I am trying to automate a file downloading from a website. When I do the download manually, all I have to do is to click on the "save" icon (floppy disk), then another window pops up for a second and the download begins (while the popped up window disappears).
What I usually do (when I automate a download) is to find the files URL, then I use the URLDownloadToFile function. But in this case I cannot find the url in the html. I tried to use the .click and FireEvent on the object but nothing worked.
So I started to think (based on similar question in this site) that a script generates the URL when I press the "save" icon. Unfortunately I am not familiar with javascript or how it works. Right now I am trying to use my browser's developer tools's console to figure out what happens when I click the object. BTW: this object is an object.
I searched the web for answers, and I think that somehow I will have to call the javascript myself if I want to download the file, with something like execScript. But how do I find out which script gets called when I click on the icon? And more importantly will I be able to understand your answer without completely understanding how a webpage works? :)
P.S.: I know it would be far easier if I could give you the site address, but it requires a login to see the stuff that I am talking about...
0 comments:
Post a Comment
Thanks