Common Automation
The Common Automation activities include all the shared and basic activities that are integrated or work in conjunction with other automation activities set, such as Desktop Automation or Web Automation. You can use these activities to perform the following types of task:
- Retrieve or add text data to the system clipboard.
- Perform browser interaction and window management, such as resize a window, activate a window, or perform a task when window is closed.
- Perform tasks in conjunctions with other automation groups such as exit a loop, modify variables, or extract data from PDF file.
- Specify how process flow is completed if an error is encountered.
Common Automation Activities
You can integrate or add the following activities with other automation activities set to design an RPA bot:
Enables the process flow to exit the loop body. This causes the process flow to jump to the next activity.
Category: Misc Actions
Properties
Name: Enter the display name of the action.
Modify the text or values of a variable.
Category: Misc Actions
Properties
- Name: Enter the display name of the action.
- Enter Variable Name: Enter the name of the variable you want to modify.
- Enter Input to be Set to above Variable: New value or text that you want to be written to the variable.
Extract text and values from a PDF file. This activity does not extract images or icons from the PDF file, and also text formatting is not copied.
Category: Misc Actions
Properties
- Name: Enter the display name of the action.
- PDF File Path: Enter the name (including extension) and path of the PDF file, from which you want to extract the text and values.
- Variable name: Specify the name of the variable to store the text or values.
Enables you to write a text (string) to the text attribute of a specified UI element.
Category: Misc Actions
Properties
- Name: Enter the display name of the action.
- Choose Window: The default window is the [Current Window] that is open when the bot is executing the activity. Alternatively, you can enter the left square bracket ([) to view the available windows list. Select the window in which the UI element exists to which you want to write the text. You can also click the Refresh icon to update the list of windows.
- Enter text to send: Enter the text to be written. You can also specify variables.
This activity will enable you to run script developed in the following scripting language in an RPA bot:
- PowerShell
- Batch Script
- Python
- VBScript
You can use the Run Custom Script activity to perform the following types of task:
- Open a file containing the script or manually specify the script using the editor you want to execute.
- Execute the functions within the script.
- Pass input arguments to the script.
- Retrieve the output result and script status generated by the activity and store it in a variable.
- Execute tasks using a script written in the scripting language that you know.
- Combine multiple file operations like add, rename, or delete into batch files.
- Compute complex mathematical operations using the script.
Category: Misc Actions
Properties
- Name: Enter the display name of the action.
- Choose Script Type: Select one of the following types of scripts you want to execute:
- PowerShell
- Batch
- Python
- vbscript
- Choose Source: Select the source of the script. You can either provide the full path of the file which contains the script or manually write the script using the editor.
- Local File: Select this option to choose an existing script file which you have already created. This field supports strings and string variables.
- File Path: Specify the full path of the script file.
- Arguments: Specify the input parameters that you want to pass to the script during the execution.
- Editor: Select this option to enter the script using the editor manually. The script is added to the bot script in Base64 encoded format. Click the Custom Script drop-down menu to view the editor link.
- Open Editor: Click the link to open the Custom Script editor and manually enter the script. After you enter the script, click Save. You can specify variables in the script.
- Local File: Select this option to choose an existing script file which you have already created. This field supports strings and string variables.
-
Success Output Variable: Specify the variable to store the output result and script status generated by the activity.
-
Error Output Variable: Specify the variable to store the error result when the activity fails to execute.
-
On Exception: Turn on the On Exception toggle to select the action that is performed when the activity fails to run or encounters an error.
-
Choose Action Type: Select one of the following actions:
-
Stop: Further execution of the bot is canceled, and an error message is displayed.
-
Continue: Bot execution continues until it encounters another error, or the execution is completed.
-
-
Before you execute an RPA Bot using the Run Custom Script activity:
- Ensure that the related environment, program, and library are installed on your computer. For example, to execute a Python script, you should have Python installed on the computer. The RPA Bot automatically connects to the related script environment or program on the computer to complete the activity.
- Check the script file exists in the path mentioned in the File Path property.
-
The scripts that are in a variable is considered as a single line, and all indentations are ignored. It might create an issue when particular strictly types of scripting language are executed. To work around this issue, use bot variables to pass scripts only if it is not dependent and do not contain commonly used delimiters.
Set PowerShell Execution Policy to RemoteSigned
When you are running the Run Custom Script activity with PowerShell script, you might encounter an execution error, and the script fails to run. This error occurs due to PowerShell execution policy, which is by default set to Restricted.
To resolve this error, you must set the PowerShell execution policy from Restricted to RemoteSigned for the CurrentUser, which will allow the PowerShell scripts to run.
Perform the following steps:
- Click Search and search for Windows PowerShell. In the search result, right-click Windows PowerShell and click Run as administrator.
- If the User Account Control dialog appears, click Yes.
- In the PowerShell console, type the following command and then press Enter:
Get-ExecutionPolicy -List
to display the execution policies for each scope.Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
to set execution policy for CurrentUser from Restricted to RemoteSigned.Get-ExecutionPolicy -List
to verify the current settings for the execution policy.Exit
.
It would help if you also verified that RemoteSigned policy is specified for LocalMachine.
Alternatively, click Start, All Programs, Accessories, Windows PowerShell, and right-click Windows PowerShell, then click Run as administrator.
Extract data from the clipboard.
Category: System Actions
Properties
- Name: Enter the display name of the action.
-
Enter variable name to assign clipboard text: Specify the variable that will store the data retrieved from the clipboard.
Enter a specified text on the clipboard.
Category: System Actions
Properties
- Name: Enter the display name of the action.
- Enter variable name/text to set clipboard text: Specify the variable from which the text would be copied to the clipboard. You can also specify the text you want to copy to the clipboard.
Use this action to retrieve a substring from a source string. This action can be used as part of the string manipulation or transformation operation.
Category: Text Actions
Properties
- Name: Enter the display name of the action.
- String or variable name: Specify the source string or the value assigned to a variable you want to modify.
-
Start Position (Index starts from 0): Specify the substring position (minimum value: 0).
-
Text Length: Specify the substring length.
-
Variable to store result: Specify the variable to store the output.
Use this action to check if characters exist within a specified string. You can also use this action to extract the substring and assign it to a variable. This action uses a regular expression (also termed as a rational expression) that defines a search pattern within a string.
Category: Text Actions
Properties
- Name: Enter the display name of the action.
-
String or variable name: Specify the source string or the value assigned to a variable, in which you want to find a character or sequence of characters.
-
Regex pattern: Specify the regular expression pattern to match for extracting the characters.
-
Variable to store result: Specify the variable to store the output.
Use this action to split a source string (that is, the sequence of characters existing within a string) into several strings and store the output in a list variable.
Category: Text Actions
Properties
- Name: Enter the display name of the action.
-
String or variable name: Specify the source string or the value assigned to a variable you want to split.
-
Delimiter: Specify a delimiter based on which you want to split the string. A delimiter is a character that specifies the boundaries between the sequence of characters within a string. For example, you can enter “
/
” for the splitting sequence of characters such asTest1/Test2/Test3
. -
Variable to store result list: Specify the list variable to store the output.
Use this action to specify a range of text that you want to extract from a source string. This action can also be used to check whether a given sequence of characters starts and ends with a specified substring and then extract the characters to a variable.
You can also use this action to remove or trim specific portions of the extracted text.
Category: Text Actions
Properties
- Name: Enter the display name of the action.
-
String or variable name: Specify the source string or the value assigned to a variable from which you want to extract text.
-
Extraction type: Select one of the following extraction options you want to use
-
Extract All After Text: Extract the entire text followed by the string you have specified in the Leading Text field.
-
Extract All Before Text: Extract the entire text before the string you have specified in the Trailing Text field.
-
Extract All Between Text: Select this option to extract the text that is in between the string you have mentioned in the Leading Text and Trailing Text fields.
-
-
Leading Text: Specify a string that you want to use as the starting point for text extraction.
-
Trailing Text: Specify a string that you want to use as the endpoint for text extraction.
-
Past Occurrences to skip: Specify a value for the number of occurrences of the string that would be considered as the starting point or ending point in the source string.
-
Variable to store result: Specify the variable to store the output.
Activate a specified window.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Enter Window Name to Active: Enter the left square bracket ([) to view the available windows list. Select the window that needs to be activated. You can also click the Refresh icon to update the list of windows.
Use this action to close a specified window.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Window name: Enter the left square bracket ([) to view the available windows list. Select the window you want to close. You can also click the Refresh icon to update the list of windows.
- This field does not accept variables.
Pause the execution of the process flow for a specified period.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Amount of time to pause (in milliseconds): Specify the period for which the execution is to be paused.
Use this action to change the position of the specified window.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Enter window name: Enter the left square bracket ([) to view the available windows list. Select the window you want to move. You can also click the Refresh icon to update the list of windows.
- This field does not accept variables.
- Enter X coordinates (left most edge is 0): New X-axis coordinate where the window should move to. See Web Automation Tool.
- Enter Y coordinates (top most edge is 0): New Y-axis coordinate where the window should move to. See Web Automation Tool.
Use this action to change the dimension of the specified window.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Enter window name: Enter the left square bracket ([) to view the available windows list. Select the window you want to resize. You can also click the Refresh icon to update the list of windows.
- This field does not accept variables.
- Enter Width (Pixel): New width of the window
- Enter Height (Pixel): New height of the window.
Define the specified window state.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Window name: Enter the left square bracket ([) to view the available windows list. Select the window you want to set the state. You can also click the Refresh icon to update the list of windows.
- This field does not accept variables.
- Choose State: Select the state of the window, such as maximize, minimize, or restore.
Pause execution of the process flow until the specified window exists.
Category: Window Actions
Properties
- Name: Enter the display name of the action.
- Window name: Enter the left square bracket ([) to view the available windows list. Select the window that should exist. You can also click the Refresh icon to update the list of windows.
- This field does not accept variables.
- Maximum how many seconds to wait: Specify the maximum time for which the execution is paused. If the window does not exist with till the time specified, the bot skips to the next activity.
Enhanced If enables you to perform a nested If Command activity. This means that you can put an If Command inside another If Command activity and based on your requirement repeating the process multiple times.
You can use this activity for nesting multiple If Commands within an If Command to create a complex If Command activity.
Category: Conditional Actions
Properties
- Name: Enter the display name of the action.
- Command: Click the drop-down button to define the Type of If Command and its conditions.
- Type of If Command: Select the type of condition that the process flow should verify. For example, Value, Date Compare, Variable Compare, and File Exists.
- Value 1: Enter the value 1
- Operand: Select an operator (such as, is equal to, is greater than, is greater than or equal to, is less than, is less than or equal to, is not equal to) to compare the values.
- Value 2: Enter another value.
- Value 1: Enter the first date.
- Operand: Select an operator (such as, is equal to, is greater than, is greater than or equal to, is less than, is less than or equal to, is not equal to) to compare the values.
- Value 2: Enter another date.
- Value 1: Enter the first value.
- Operand: Select an operator (such as, contains, does not contain, is equal to, is not equal to) to compare the values.
- Value 2: Enter another value.
- Case Sensitive: Select if you want to check the case when comparing the values.
- Variable Name: Enter the name of the value.
- Variable Name: Enter the name of the value.
- Window Name: Enter the name of the window instance.
- Window Name: Enter the name of the window instance.
- File Path: Specify the full path of the file you want to check.
- True When: An operator if the file exists or not.
- Folder Path: Specify the path of the folder you want to check.
- True When: An operator if the folder exists or not.
- Instance Name: Specify the instance of the browser which you want to use as a reference for the automation job.
- Element Search Method:
Select one of the following methods based on which the UI element is to be
searched:
- Find Element By ID
- Find Element By Name
- Find Element By XPath
- Find Element By Tag Name
- Find Element By Class Name
- Find Element By CSS Selector
- Element Search Parameter: Enter the value that exists for a specific attribute of a UI element you want to find.
- Window Name: Enter the name of the window instance in which the GUI element is to be searched.
- Element Search Method:
Select one of the following methods based on which the GUI element is to be
searched.
- AutomationId
- Name
- ProcessId
- Element Search Parameter: Enter the value that exists for a specific attribute of a GUI element you want to find.
- ADD: Click to add another If command, and then define its type and conditions.
Type of If Command |
Description |
Related Properties |
---|---|---|
Value |
Enter the value expression that will be compared. |
|
Date Compare |
Enter the date expressions that will be compared with. |
|
Variable Compare |
Enter the variable that will be compared with. |
|
Variable Has Value |
Provide the variable for which value is already defined. |
|
Variable Is Numeric |
Enter the variable for which numeric value is already defined. |
|
Window Name Exists |
Check if a window instance exists. |
|
Active Window Name Is |
Check if the specified window instance is active. |
|
File Exists |
Check if a specific file exists. |
|
Folder Exists |
Check if a specific folder exists. |
|
Web Element Exist |
Check if the specified UI elements are available on the browser windows. |
|
GUI Element Exist |
Check if the specified Graphical User Interface (GUI) element is available. |
|
This activity allows you to stop the Enhanced If commands loop, and then continue with the next activity in the RPA Model.
Category: Conditional Actions
Properties
- Name: Enter the display name of the action.
- Instance Name: Specify a unique name that identifies the If Command activity.