Robot Framework - Download File

Hi,

I think the topic below could help you about downloading, as you can set the default download directory in the chrome options used when launching the browser.

I’m usually dealing with same issues, i.e. I have a button to download, print, export or else and get the files downloaded automatically in the folder named dynamically after date-time\test_type\${TEST_NAME}.

In my case names contain the date-time, so it’s quite obvious to find which one is the right candidate with custom scripts. So not knowing how your file naming is, you could use some of these keywords to narrow down which file is interesting for you:

  File Should Exist    path
  Wait Until Created    path
  Should Exist   path
  List Files In Directory
  Get Modified Time

Note that for some of these keyword you can use partial name content with *
I would also suggest that from run to run, download folder should be emptied if results are PASS and you don’t need further analysis, or use Move Files keyword to store previous results for example.

Regards.
Charlie

1 Like