Setting Input and Output Parameters in Project Properties#
Input Parameters #
To work with input parameters, you need to follow these steps:
1. Open Project Properties#
Go to the Project tab, right-click on the project folder, and select "Project Properties" from the context menu:
2. Create a JSON File#
In the opened Project Properties window, click on the "Create Argument File" button.
Select a directory for the JSON file that will be used to pass parameters to the Robot, enter its name, and click the Save button:
Review the warning from Sherpa Designer and click OK.
3. Specify Input Parameters#
Click on the "Add Parameter" button:
Click on the Name field and select the desired parameter:
Click the OK button.
4. Add Arguments to the JSON File#
Open the created JSON file from Step 2 in the selected directory.
Specify the arguments you want to pass in your script. For example,
[{"Name":"file_name","Type":"Text","Direction":"In","Value":"file_name"}]
5. Run the Robot#
Open the Command Prompt, enter the path to the ProcessAgent.exe file, and then the command:
ProcessAgent.exe -args "path to argument file" "path to .robot file"
where:
-args— command line key (parameters from the JSON file)."path to argument file"— the full path to the JSON file created in Step 2."path to .robot file"— the path to the Robot script file.
For example,
The path to the ProcessAgent.exe file can be found by right-clicking the Sherpa Assistant shortcut on the desktop and selecting "Open file location". |
Output Parameters#
To work with output parameters, you need to follow these steps:
1. Open Project Properties#
Go to the Project tab, right-click on the project folder, and select "Project Properties" from the context menu:
2. Create a JSON File#
In the opened Project Properties window, click on the "Create Argument File" button.
Select a directory for the JSON file that will be used to pass parameters to the Robot, enter its name, and click the Save button:
Review the warning from Sherpa Designer and click OK.
3. Specify Output Parameters#
Go to the Output Parameters tab. Click on the "Add Parameter" button. Click on the Name field and select the desired parameter:
Click the OK button.
4. Add Arguments to the JSON File#
Open the created JSON file in the selected directory:
Specify the arguments you want to pass in your script. For example,
[{"PathData":"14.03.2025","Type":"Text","Direction":"Out","Value":"PathData"}]
5. Run the Robot#
Open the Command Prompt, enter the path to the ProcessAgent.exe file, and then the command:
ProcessAgent.exe -args "path to argument file" "path to .robot file"
where:
-args— command line key (parameters from the JSON file)."path to argument file"— the full path to the JSON file created in Step 2."path to .robot file"— the path to the Robot script file.
The path to the ProcessAgent.exe file can be found by right-clicking the Sherpa Assistant shortcut on the desktop and selecting "Open file location". |