Upload File on Webpage
Command description
Set file paths on a web file-input element through the browser API without opening a file-picker dialog.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Webpage Object | WebPage | Upload files on this page |
| Web Element | WebElement or str (captured element UID, not element name, not ms-rpa-id) | File-input element; select a captured element or one returned by Get Web Element, Get Similar Web Elements, or Get Related Web Elements |
| File List | str or list[str] | One absolute local file path or a list of absolute paths |
| Element Wait Duration | number | Maximum time to wait for the element to appear, in seconds |
Command Output Parameters
None
Type definition reference
- Download and import silent-upload.qya (right-click and select Save link as) to view the sample workflow.
The element must be <input type="file">.
Each file path must be absolute, for example C:\files\report.pdf.
The command accepts one or multiple files. In Python mode, provide a str or list[str]. Otherwise, enter one file path per line.
-
Python
list[str]method to upload two files -
Python
strmethod to upload a file -
Upload two files in non-Python mode
Note
On the browser's extensions page, open the Runavelo extension details and enable Allow access to file URLs. Then refresh the webpage before uploading.
Some sites, including QQ Mail and Zhihu, hide their <input type="file"> element so it cannot be captured directly. Capture a related element, then edit it by adding an INPUT node with the attribute type=file.
- Runavelo browser extension 2.4.0 or later
- Runavelo 7.7.0 or later