Help Retrieving Downloaded File into Output Directory (Using RPA.Browser.Selenium)

Hi All,

Noobie here.

I’ve created a simple robot that logs into a website, sets the desired report settings and clicks a button to download the csv report.

I’m stuck on how to retrieve the csv report into the robot output directory.

When the robot is run on my computer it either:
A. The download button is clicked and the report downloads fast enough to not open a second page. The report downloads into my computers Downloads directory.

B. The download button is clicked and the browser navigates to a waiting page. The waiting page waits until the download is ready, at which point it downloads to my computers Download directory.

I’d like to eventually schedule and run this robot from the workforce control room so I am curious what the best way to make sure the download is stored in the robots Outputs directory.

I’ve been experimenting with the following keywords but I think my main problem is getting the file to store in the proper directory.

  • Set Download Directory
  • Wait Until Element Is Visible
  • Wait And Click Button

One final note - the file name is not always the same. It will change depending on the month/year the report is downloaded.


1 Like

Hi, I feel you’re on the right path. Still, if you’re using Selenium with Chrome and if above isn’t enough, you can inspire from this library extension (you put it in your robot root and import with Library ExtendedSelenium) to add other preferences as well, like the following:

  • profile.default_content_settings.popups as 0
  • download.default_directory to your desired path

Let us know how it goes and good luck!