Skip to main content
Roberty Studio
RPABrowser

Download file

Download file

Downloads a file from a clickable element on the page, from a direct URL, or from an element already captured. The file is saved to a folder on the machine the robot runs on.

Note

The file is saved on the machine the robot runs on. Make sure the destination folder exists before the action runs.


Options​

Browser or page ID​

The browser opening action where the download happens.

Select the action​

How the download is started:

  • An element in the browser — clicks the element given by a CSS selector to start the download (default)
  • An element already selected — uses an element already captured by Get element
  • One item from a selection of multiple elements — uses an item from a list captured by Get Multiple Elements

Element selector​

The CSS selector of the element whose click starts the download. It appears in An element in the browser mode — a#btnDownload, for example.

File URL​

The file's direct URL, used for a download by URL, without touching the page.

Element ID​

The Get element action that captured the element starting the download. It appears in An element already selected mode.

Elements list id​

The Get elements action that captured the source list. It appears in One item from a selection of multiple elements mode.

Enter the index of the list​

The position in the list of the element to click. The index starts at 0.

Download path​

The folder on the machine where the downloaded file is saved.

File name​

The name, with extension, given to the file after the download. Left empty, the name the server suggests is used.

Timeout​

How long, in seconds, to wait for the download to start before raising an error. Default: 60.

Returns​

Javascript code​

js
actions["action-id"].downloadPath // the downloaded file's full path on disk (Text)

Field selection​

  • downloadPath — the downloaded file's full path on disk (Text)

Rules and conditions​

  • Browser or page ID is required.
  • Download path has to be a folder that exists on the machine the robot runs on.
  • A download by URL happens directly, without touching the page, in a temporary tab.
  • The download is caught even when it is triggered inside an iframe (point Browser or page ID to a Get Iframe action) or when the site opens a new tab or window just to start it.
  • If the element is not found, or the download does not start within the timeout, the action ends in an error.

What is new​

v2.0.0​

  • Downloads now work in browser sessions opened in incognito mode.