Skip to main content

File Upload

Uploads a file to a file input element by providing the file path.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing the node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If Continue On Error property is true, no error is caught when the project is executed, even if the Catch node is used.

Input

  • Browser ID - The browser session identifier from the Open Browser node.
  • Selector - The XPath or CSS selector to locate the file input element.
  • File Path - Full absolute path to the file to upload.

Options

  • Selector Type - Type of selector used:

    • XPath - Use XPath expression (default)
    • CSS - Use CSS selector
  • Wait Timeout (sec) - Maximum time to wait for the file input element to appear. Default is 5 seconds.

Examples

Upload Image

Browser ID: {{browser_id}}
Selector: //input[@type='file']
File Path: C:\Users\username\Pictures\photo.jpg

Upload Document

Browser ID: {{browser_id}}
Selector: input[name='document']
Selector Type: CSS
File Path: C:\Documents\report.pdf

Upload from Variable

Browser ID: {{browser_id}}
Selector: //input[@id='file-upload']
File Path: {{file_path_variable}}

Multiple File Upload Workflow

1. For each file in file_list:

File Upload node:
Browser ID: {{browser_id}}
Selector: //input[@type='file']
File Path: {{file}}

Click Element (submit):
Browser ID: {{browser_id}}
Selector: //button[@type='submit']

Wait Element (success message):
Browser ID: {{browser_id}}
Selector: //div[@class='success']

HTML File Input Example

This node works with standard HTML file input elements:

<input type="file" name="upload" />

Tips

  • Use absolute file paths for reliability
  • Ensure the file exists before attempting upload
  • The file must be accessible from the machine running the automation
  • Works with standard HTML <input type="file"> elements
  • For drag-and-drop uploads, use Drag And Drop
  • Some websites process uploads immediately, others need a submit button click
  • File size limits are enforced by the website, not this node

Common Errors

  • "Browser ID cannot be empty" - Connect to an Open Browser node
  • "Selector cannot be empty" - Provide an XPath or CSS selector for the file input
  • "File Path cannot be empty" - Provide the full path to the file
  • "File not found at path: X" - The file doesn't exist. Verify the path is correct and the file exists
  • "File input element not found within X seconds" - The input element doesn't exist or takes longer to load
  • "Timeout cannot be empty" - Provide a timeout value