> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/web/custom/upload-a-file.md).

# Upload a File

This is pre-built Action located under the **@Custom Element.** The functionality of this action in Avo Assure to upload a file on the object specified in the input by providing the file path from the local system, and save the result in dynamic variable.

### **Syntax:** 

**Input Value:** `<Object Type >;<Visible Text(Optional)>;<index>;<file path>;< file name><wait(in second)>;<abs (optional)>`

| Argument                                     | Description                                                                                                    |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| <p>\<ObjectType><br>(Required)</p>           | Specify the type of object (e.g., Button)                                                                      |
| <p>\<VisibleText><br>(Optional)</p>          | Enter the visible text on the object                                                                           |
| <p>\<Index><br>(Required)</p>                | Provide the index of the object inside the page                                                                |
| <p>\<FilePath><br>(Required)</p>             | Path to the folder containing the file to upload                                                               |
| <p>\<FileName><br>(Required)</p>             | Name of the file to be uploaded (e.g., Report\_Q2.pdf)                                                         |
| <p>\<WaitTime(in seconds)><br>(Optional)</p> | Wait time before action execution                                                                              |
| <p>\<abs><br>(Optional)</p>                  | If the **abs** is provided, the action is performed with absolute identification using the **absolute X path** |

{% hint style="warning" %}
**Note:**

* *If the ‘wait (in seconds)’ input is specified, then the action will be performed after the duration of the specified wait time.*
* *If for last argument abs is defined, then the Action must be executed with absolute preformation with the specified visible text in the input.*
* *To skip an optional input value, use an extra semicolon (;).*
  {% endhint %}

**Output Value**

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

**Example**

**Uploads a specified file to the selected input field in the application interface**

The **Upload a File** action takes the value from the Input Value column (e.g., **input;;0;C:\Documents\Reports;Report\_Q2.pdf;3**) and uploads the given file after the specified wait time. The result of the file upload operation is stored in the **{Upload}** variable, with the following possible values:

* **True** – if the file is uploaded successfully.
* **False** – if the file upload fails.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FVf5giJBO7aMBXlVkhawG%2Fimage.png?alt=media&amp;token=84678995-3ebc-457b-82c0-cdbed7bb6398" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
