-
Block header: Shows the current name of the Web File Upload block. You can rename it at any time by double-clicking the header and typing a new title to keep flows readable and organized.
-
Select File Upload Element: Contains the locator for the web element that receives the uploaded file (for example, an <input type="file"> control). This parameter must be set.
-
Right-click and select Capture new web element to capture the element.
-
Right-click and select Edit web element to adjust the locator.
-
Right-click and select Clear web element to remove it.
-
File Input: Groups the settings for where the file comes from, including Source type and the file-selection fields.
-
Source type: Defines where the file to upload is obtained from. Available options are:
-
Select Data File to Upload:
Used when Source type = Data File. Clicking this field opens a file dialog where you can choose the file to upload. Once selected, the file is saved in Leapwork.
Note: If the file content changes, you must re-upload the updated file so the Data File in Leapwork is refreshed.
-
Path To File: Used when Source type = Local Path. Clicking this field opens a file dialog where you can select a file path from the local file system or a shared network location. The selected path is then shown in the text box.
Note: Because the file is referenced by path and not stored in Leapwork, you can update the file directly at that path and the new content will be used on subsequent runs.
-
Found element: Contains the web element that was found in the browser window for the file-upload control. This can be reused as a Source element or passed to other blocks to limit later searches to the same area of the page.
-
Not found: Triggers if the file-upload web element cannot be found before Timeout expires. This output is typically used to branch the flow or to explicitly fail a case by connecting it to a Fail block.
-
Source element: Restricts the search so that the file-upload element is only looked for inside a previously captured container element. For example, if a table web element was found in a previous block, setting that table as the Source element allows you to search for the upload control only inside that table.
-
Browser window: Specifies which browser window the block should use. This is useful when multiple windows or tabs are open. When left blank, the block uses the default browser window of the flow.
-
Use occurrence: Determines which occurrence of the matching element to use when more than one is found:
-
Specific index: use a particular occurrence (for example, the first match).
-
All: iterate through all occurrences. When All is selected, the Current index property and Completed output are enabled, and the main execution path is triggered once per occurrence.
-
Current index: Indicates which occurrence is currently being processed when Use occurrence = All. For example, if three upload elements are found, this value will be 1, then 2, then 3 as the block iterates.
-
Completed: Triggers when all occurrences have been processed while Use occurrence = All.
-
Count: Contains the total number of web elements that match the locator defined in Select File Upload Element. This can be useful for validation or branching based on how many upload controls are present.
-
Default timeout: Controls how the timeout is determined:
-
When the checkbox is not selected, the block uses a fixed timeout of 10 seconds, unless you override it via Timeout.
-
When the checkbox is selected, the block uses the Default timeout value defined in the flow settings.
-
Timeout: Sets the maximum amount of time the block spends searching for the file-upload element before giving up and triggering the Not found output. This timeout applies only to this block. Each case also has a separate global timeout configured in the Settings panel; if the case runs longer than the global timeout, it is cancelled regardless of this block’s timeout.
-
Scroll to find: Specifies whether scrolling should be used while searching for the element. When you choose a value other than None, the block scrolls the page while searching, which is useful for pages with infinite scroll or lazily loaded content.
-
Max repeats: Defines the maximum number of scroll attempts performed when Scroll to find is enabled. If the element is not found after this number of scrolls, the search stops.
-
Amount: Specifies how far the page should scroll during each scroll attempt when Scroll to find is enabled.
-
Delay (sec): Sets the delay, in seconds, between scroll attempts when Scroll to find is enabled.
-
Await DOM change: When enabled, delays the search for the file-upload element until there have been no changes to the page’s DOM for a specific period. This is useful when background JavaScript updates the page. Regardless of this setting, the search and upload will still occur after a maximum of 30 seconds.
-
Await Timeout (DOM): Defines, in seconds, how long the DOM must remain unchanged when Await DOM change is enabled before the block proceeds.
-
Await Requests: When enabled, delays the search until there have been no active XHR (XMLHttpRequest) requests for a specified period, useful for web applications that perform heavy background communication. Regardless of this setting, the action will still occur after a maximum of 30 seconds.
-
Await Timeout (Requests): Defines, in seconds, how long there must be no active XHR requests when Await Requests is enabled before the block proceeds.