Skip to main content
Browser

Download a file

Download a 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:

  • By selector — clicks a CSS element to start the download
  • By URL — downloads straight from a URL, without touching the page
  • By element — uses an element already captured by Get element
  • By element list — uses an item from a list captured by Get elements

Element selector

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

File URL

The file's direct URL. It appears in By URL mode.

Element ID

The Get element action that captured the element starting the download. It appears in By element mode.

Element list ID

The Get elements action that captured the source list. It appears in By element list mode.

The list index

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.
  • In By URL mode the download happens directly, without touching the page, in a temporary tab.
  • 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.