Downloading files through browser on existing session


#1

I have a need to be able to download a larger amount of files from a site, keeping the current session to make sure authentication is ok. E.g. I have an authenticated UiPath.Core.Browser object, which I’d like to use for downloading a set of files similar to how it would be done with wget, eg.

https://somesite.com/fileDownload.do?oid=1666801&docTitle=XYZ
https://somesite.com/fileDownload.do?oid=1666802&docTitle=XYZ
https://somesite.com/fileDownload.do?oid=1666803&docTitle=XYZ
https://somesite.com/fileDownload.do?oid=1666804&docTitle=XYZ

etc.

I can use the “Navigate go” activity to open the files and from there let IE use “Save as” and save them, but I had hopes there would be a simpler “from URL -> file on filesystem” way (that supports taking an existing browser object.

Anyone has suggestions ? =)


#2

you can use HTTP Request activity

Download File URL goes into EndPoint property

Local File Name goes into ResourcePath property.


#3

I considered and tried that earlier, but how do you provide an existing UiPath.Core.Browser object to it ? That activity would give you a new session (and I wouldn’t like to try to handle the cookies used for authentication with the server manually).