In a nutshell
The Upload task attaches a file to a file input element on a webpage. It supports file input elements configured to accept either a single file or multiple files. This task is commonly used to upload documents, images, or other file types during checkout, registration, or any workflow that requires a file attachment. The file is selected from the Files section in your QEngine project settings.
The Upload task adds a file to an input element that accepts file attachments. It can upload a file to a single-file input field or add a file to a multi-file input field. The task can automate workflows such as profile photo uploads, job application submissions, expense claim receipts, or identity verification documents.
In the process, testers can verify that the application accepts files correctly, validates upload requirements, and processes attached documents as expected.

Note:
Add the file to Files under Settings in your QEngine project before referencing it in an Upload task.
When multiple Upload tasks target the same web element, a single-file input field keeps only the most recently uploaded file. Whereas a multi-file input retains the existing files and appends the new file.
upload(<locator>, files.<filename>);
| Parameter | Data Type | Description |
| locator | STRING | Identifies the file input element to upload to. Note: You can find a locator by manually inspecting the webpage for the element, or by using an element already saved through a recording session. Learn more about Elements |
| filename | OBJECT | Name of the file to be uploaded, referenced from the Files section. Note: Files are added and managed from Files inside Settings for each project. |
Uploads a product image file to the image upload field on a seller listing page, using a file stored in the project's Files section.
// Open the seller listing page on the ZWatch Commerce website using the Open URL task
openURL("https://zwatch.zohocommerce.com/seller/new-listing", "same window");
// Upload the product image using the Upload task
upload(ui.zwatch.product-image-upload, files.Daytona_Front_View);where:
| "https://zwatch.zohocommerce.com/seller/new-listing" | Seller listing page URL. |
| "same window" | Opens the page in the window already running the test. |
| ui.zwatch.product-image-upload | Stored locator for the image upload field. |
| Daytona_Front_View | Name of the file referenced from the Files section. |
Uploads a resume file to the resume field on a careers page, then confirms the file name appears as a visible confirmation that it uploaded successfully.
// Open the careers application page on the ZWatch Commerce website using the Open URL task
openURL("https://zwatch.zohocommerce.com/careers/apply", "same window");
// Upload the resume file using the Upload task
upload(ui.zwatch.resume-upload-field, files.Applicant_Resume);
// Confirm the uploaded file name appears using the Assert Text task
assertText(ui.zwatch.uploaded-file-name, "Applicant_Resume.pdf", errorhandling.STOP_ON_ERROR);where:
| "https://zwatch.zohocommerce.com/careers/apply" | Careers application page URL. |
| "same window" | Opens the page in the window already running the test. |
| ui.zwatch.resume-upload-field | Stored locator for the resume field. |
| Applicant_Resume | Name of the resume file referenced from the Files section. |
| ui.zwatch.uploaded-file-name | Stored locator for the uploaded file name shown after a successful upload. |
| errorhandling.STOP_ON_ERROR | Stops the test if the file name doesn't appear as expected. |
Uploads a sales order file to the sales order field on a procurement form, built on Zoho Creator, using the Upload task.
// Open the procurement form in the Procurement application using the Open URL task
openURL("https://creatorapp.zoho.com/zylker/procurement#Form:Purchase_Request", "same window");
// Upload the sales order file using the Upload task
upload(ui.procurement.sales-order-field, files.Sales_Order_4521);where:
| "https://creatorapp.zoho.com/zylker/procurement#Form:Purchase_Request" | Procurement form URL. |
| "same window" | Opens the form in the window already running the test. |
| ui.procurement.sales-order-field | Stored locator for the sales order field. |
| Sales_Order_4521 | Name of the file referenced from the Files section. |
Two supporting documents get attached to the same upload field, one call per file, since the field accepts more than one attachment at once.
// Open the page using the Open URL task
openURL("https://www.<website_name>.com/<page_name>", "same window");
// Upload the first supporting document using the Upload task
upload(ui.<page_name>.<element_name>, files.ID_Proof);
// Upload a second supporting document to the same field using the Upload task
upload(ui.<page_name>.<element_name>, files.Address_Proof);where:
| "https://www.<website_name>.com/<page_name>" | Page URL. |
| "same window" | Opens the page in the window already running the test. |
| ui.<page_name>.<element_name> | Locator for the supporting documents field, built to accept multiple files. |
| ID_Proof | Name of the first file, referenced from the Files section. |
| Address_Proof | Name of the second file, added alongside the first rather than replacing it. |
Online marketplaces typically require at least one product image before a seller can publish a new listing, since customers rely on product photos to evaluate what they are buying.
A tester uses Zoho QEngine to automate this validation. The test first confirms that attempting to publish a listing without an image is blocked with a validation error. It then uploads the required product image and verifies that the listing can be published successfully. If the validation failed, sellers could either publish listings without images or be prevented from publishing even after uploading a valid image.
Steps
Implementation
// Step 1: Open the seller listing page on the ZWatch Commerce website in the same window using the Open URL task
openURL("https://zwatch.zohocommerce.com/seller/new-listing", "same window");
// Step 2: Enter the product title using the Set Value task
setValue(ui.zwatch.product-title-field, "Vintage Diver Watch");
// Step 3: Attempt to publish the listing without an image using the Click task
click(ui.zwatch.publish-listing-button);
// Step 4: Confirm the missing-image error message appears using the Assert Visible task
assertVisible(ui.zwatch.image-required-error, errorhandling.CONTINUE_ON_ERROR);
// Step 5: Upload the product image using the Upload task
upload(ui.zwatch.product-image-upload, files.Daytona_Front_View);
// Step 6: Publish the listing again using the Click task
click(ui.zwatch.publish-listing-button);
// Step 7: Confirm the listing is published successfully using the Assert Visible task
assertVisible(ui.zwatch.listing-published-confirmation, errorhandling.STOP_ON_ERROR);Job seekers sometimes need to reapply with an updated resume after realizing the one they submitted was outdated.
A tester uses Zoho QEngine to automate this validation. The test confirms that uploading a second resume to the same field replaces the outdated one, reflecting only the newer file name on the form. If the validation failed, the applicant's outdated resume could still reach the hiring team.
Steps
Implementation
// Step 1: Open the careers application page on the ZWatch Commerce website in the same window using the Open URL task
openURL("https://zwatch.zohocommerce.com/careers/apply", "same window");
// Step 2: Upload the outdated resume file using the Upload task
upload(ui.zwatch.resume-upload-field, files.Applicant_Resume_Old);
// Step 3: Upload the updated resume file to the same field using the Upload task
upload(ui.zwatch.resume-upload-field, files.Applicant_Resume_Updated);
// Step 4: Confirm only the updated file name is shown using the Assert Text task
assertText(ui.zwatch.uploaded-file-name, "Applicant_Resume_Updated.pdf", errorhandling.STOP_ON_ERROR);Scenario 3: Attaching a required receipt before an expense claim can be submitted
Consider a finance organization that uses a Zoho Creator Expense Tracker application to manage employee reimbursements. The Expense Claim form includes a receipt upload field, and expense claims above a certain amount require a receipt attached there before the form can be submitted for approval.
A tester uses Zoho QEngine to automate this validation. The test confirms that the form can't be submitted without a receipt, uploads the receipt, and confirms the file was accepted before submitting. If the validation failed, expense reports could be submitted without the required supporting documents, or a receipt could silently fail to attach without anyone noticing.
Steps
Implementation
// Step 1: Open the Expense Claim form in the Expense Tracker application using the Open URL task
openURL("https://creatorapp.zoho.com/zylker/expense-tracker#Form:Expense_Claim", "same window");
// Step 2: Attempt to submit the form without a receipt using the Click task
click(ui.expensetracker.submit-button);
// Step 3: Confirm the missing-receipt error appears using the Assert Visible task
assertVisible(ui.expensetracker.receipt-required-error, errorhandling.CONTINUE_ON_ERROR);
// Step 4: Upload the receipt file to the receipt field using the Upload task
upload(ui.expensetracker.receipt-field, files.Taxi_Receipt);
// Step 5: Confirm the receipt file name appears using the Assert Text task
assertText(ui.expensetracker.uploaded-file-name, "Taxi_Receipt.pdf", errorhandling.STOP_ON_ERROR);
// Step 6: Submit the form and confirm it's accepted using the Click and Assert Visible tasks
click(ui.expensetracker.submit-button);
assertVisible(ui.expensetracker.submission-confirmation, errorhandling.STOP_ON_ERROR);