File generated after button click cannot be saved in download directory ON ROBOCORP CLOUD


We have a use case where we have save the file generated after a button click. Here are steps:

Open Available Browser
Set Download Directory ${CURDIR}${/}temp
Click Element If Visible
Wait Until Element Is Not Visible
#more tasks

We are not able to see the file.

When we check the logs - on Open Available Browser command we are seeing some warning. Have attached the image for the same. Also we see Download as false in the Attempted Combinations table, not sure if that is the problem.
Screenshot 2023-08-28 at 3.24.36 PM

Adding some more details:

The button click makes an API call which returns the CSV. On local environment the once api call is successful the chrome/other browsers downloads the file as expected in the desired folder.

Has robot created that ${CURDIR}${/}temp folder? If it does not exist, it might be that saving there fails (maybe silently) …

Hello! Thank you for the reply.

we manually added ‘temp’ folder under the main robot structure.

Will also try creating one with operating system library as you mentioned.

Please remember that,

  1. on cloud containers, there is nobody who adds anything “manually”
  2. same applies to every robot/assistant that is executed somewhere else than your manually managed machines
  3. everything must be bundled inside
  4. so if you want directory inside robot, have a “placeholder” file there that will create directory when extracted
  5. make sure, that ignore file does not ignore that placeholder file or that directory (folder “temp” is probably ignored by default …)

We created placeholder folder by name ‘temp’ inside robot and bundled it in zip. - didn’t help though.

Will share more information after using Operating System library.

See point 5. on above list. So default robot templates have “temp” in .gitignore file, so that wont end up in unless you remove it from there. But also consider better naming than temp, like for example downloads.


Here are the steps we have taken so far:

  1. Using operating system library we are creating a directory by name downloads. Below is the code:
    OperatingSystem.Create Directory ${CURDIR}${/}downloads
    Set Global Variable ${WORKING_DIRECTORY} ${CURDIR}${/}downloads

  2. Using headless=False for Open Available Browser & Setting the Download directory as ${WORKING_DIRECTORY}
    Open Available Browser headless=False
    Set Download Directory ${WORKING_DIRECTORY}

  3. Waiting for download button to be visible before clicking. (we are not seeing any error here.)

  4. Waiting for loading icon to disappear. (we are not seeing any error here.)

  5. Listing files from the working directory - Logs are showing as empty list. Code(Write Logs is our custom keyword):
    ${files}= RPA.FileSystem.List files in directory ${WORKING_DIRECTORY}
    FOR ${file} IN @{files}
    Write Logs ${file}

PS: we are also using Maximize Browser Window but we don’t see maximized window as we purposely failed our script for debugging - we see elements in small window.

Few notes:

  • did it work or fail? unclear from latest message after all those changes …
  • please note, that all cloud container runs are “headless” (Linux containers do not have Desktop installed)
  • and if this is still problem, please submit issue from Control Room run where this happens

It’s still failing.

I’ll submit the issue from control room. Thank you for that suggestion.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.