Skip to main content

Upload file

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

This command allows you to upload one or more files on a web page. It automates the process of locating an upload button, clicking it, and selecting the file to be uploaded through a web interface.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Web page

Select a variable that contains the web page to work with

Web page variable

Yes

Must be a valid web page object

Upload button

Select an option to locate the upload button element

Auto detect, Manual select

Yes

Auto detect will attempt to find the upload button automatically

Element

Select or capture an element to operate on

Element selector

Yes (when Manual select is chosen)

Only required when "Manual select" is chosen for Upload button

File to upload

Select the file to upload

File path

Yes

Must be a valid file path accessible to the RPA bot

Advanced settings

Parameter

Description

Required

Options / Notes

Wait time (s)

Timeout in seconds for upload dialog after clicking upload button

No

Default is 20 seconds

Wait for upload button (s)

Wait for a number of seconds until the upload button appears

No

Default is 3 seconds

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables for any parameter by clicking the {x} icon. This allows you to dynamically set file paths, wait times, or reference web page objects created in previous steps. For example, you might use a variable for the file path if the file to upload is determined at runtime.


Notes

  • Before using this command, ensure that you have a valid web page object already loaded.

  • The "Auto detect" option works best with standard HTML file upload inputs. For custom or complex upload interfaces, use "Manual select" to specify the upload button.

  • Some websites may have security measures that prevent automated file uploads. In such cases, this command might not work as expected.

  • Large files may take longer to upload; adjust the "Wait time" parameter accordingly.

  • If the upload button is loaded dynamically, increase the "Wait for upload button" value to give the page enough time to render the button.

Did this answer your question?