Help Centre › Building Processes
This article describes the RPA Browser functionality to run javascript.
For a full list of available functions, please read BROWSER functions.
Description
The BROWSER Run javascript function allows you to run javascript.
Setting it up
To use the BROWSER Run javascript function, follow these instructions:
{{popups:rpas/add:action=browser-javascript}}
Once on a process map:
- Navigate to the process where you would like to add the BROWSER Run javascript function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the BROWSER Run javascript option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| JavaScript code | Yes | Text (multi-line) | – | The JavaScript code to execute in the browser. |
| Variable | Yes | Text | – | Variable to store the return value. |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Text | The value returned by the JavaScript code. |
Errors
| Error | Description |
|---|---|
| Script error | The JavaScript code contains an error. |
| Timeout | The script did not complete within the timeout period. |
Tips
- Return a value using 'return' in your script to capture results.
- Use this for advanced operations not available through standard actions.