# Upload a File

This is a pre-built Action located under the captured link element. The functionality of this Action in Avo Assure is to upload a file from the specified local system path to the designated link element in the application. The result is stored in the given dynamic variable for further use during test execution.

## **Syntax**

**Input Value**: `<File path>;<File name>;<Wait (in seconds)>`        &#x20;

| Argument                                  | Description                                                                       |
| ----------------------------------------- | --------------------------------------------------------------------------------- |
| <p>\<File path> <br>(Required)</p>        | Provide the path or location of specific file from the Local system.              |
| <p>\<File name><br>(Required)</p>         | Provide the name of a particular file which you want to upload.                   |
| <p>\<Wait (in seconds)><br>(Required)</p> | Provide a wait time (in seconds) to perform the action after the specified delay. |

**Output Value**: `<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)`

| Argument                                                    | Description                                                       |
| ----------------------------------------------------------- | ----------------------------------------------------------------- |
| \<Dynamic Variable>(Optional);\<Dynamic Variable>(Optional) | This dynamic variable stores the status as **True** or **False**. |

### **Example: Uploading a File to the Target Location in the Application**

In this example, we explain how to upload a file to the required location in the application using the specified file path, file name, and wait time.

* **Action**: Upload a File
* **Input Value**: C:\Users\Documents;TC02.pdf;2
  * The first argument (**C:\Users\Documents**) specifies the folder path where the file is located.
  * The second argument (**TC02.pdf**) specifies the name of the file to be uploaded.
  * The third argument (**2**) specifies the number of seconds the action should wait before performing the upload.
* **Output Value**: {Status}
  * The upload result is stored in the **{Status}** dynamic variable, with the following possible values:
    * **True**: If the file is uploaded successfully.
    * **False**: If the file is not uploaded successfully.
* **Logical Explanation**: The **Upload a File** action reads the details from the **Input Value** column (**C:\Users\Documents;TC02.pdf;2**). It locates the file in the specified directory, waits for the defined duration, and attempts to upload the file to the target location in the application. After the upload operation is completed, the action stores the execution result (**True**) in the **{Status}** variable.

<figure><img src="/files/GAH2r65p0S9qvVuoSPuP" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/web/link/upload-a-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
