FileUpload command examples

Official Content
This documentation is valid for:

In this article, you will find examples of FileUpload command implementation in two different controls.

Automated file upload in File Upload User control

Web Panel with a FileUploadData variable called “FileUploadData”:

FileUploadData variable in webpanel

The variable view is the following:


To automated upload a file you have to use the commands FileUploadByName and  ClickBy, in example: 

//Start webdriver
// Initial navigation
//automated files upload
//...more files.. 
&driver.ClickByCSS("#FILEUPLOAD1Container > div > div.row.fileupload-buttonbar > div.col-lg-7 > button.btn.btn-primary.start > span")

* “files[]” is the name of “+Add files...” button
* The click command over is over the “Start upload” button to load the files

Automated file upload in Blob data type

Web Panel with a Blob variable called “AttacheBlob”:


The variable view is:


To automated upload a file you have to use the command FileUploadByName. Optionally, you can verify the name upload file with the command Verify

//Start webdriver
// Initial navigation
//automated file upload
//verify the name of the upload file