Rpa Unit-V Notes
Rpa Unit-V Notes
Rpa Unit-V Notes
UiPath
UiPath provides an activity called Invoke Power Shell or Invoke Code which can be used
to run terminal commands. Here's how you can do it:
IsScript: False
2.Invoke Code:
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
startInfo.FileName = "cmd.exe"
process.StartInfo = startInfo
process.Start()
Automation Anywhere
Automation Anywhere offers a Run Script command that can be used to execute
terminal commands. Here's how you can do it:
Example in VBScript:
Example Command
Let's assume you want to list the files in a directory using the ls command
(Linux/Mac) or dir command (Windows).
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
startInfo.FileName = "/bin/bash"
process.StartInfo = startInfo
process.Start()
Using these methods, you can execute terminal commands from within your RPA
workflows. The exact approach depends on the RPA tool you are using and the
scripting capabilities it provides. Always ensure your script commands are properly
tested and secure to avoid any unintended system changes or security vulnerabilities.
UiPath
UiPath provides several activities specifically designed for working with PDFs. Here
are some common activities:
This activity reads all the text from a PDF file and stores it in a string
variable.
Input: FileName (path to your PDF)
Example:
This activity reads the text from a scanned PDF using OCR (Optical Character
Recognition).
Input: FileName (path to your scanned PDF)
Example:
This activity extracts specific pages from a PDF and saves them as a new PDF
file.
Input: FileName (path to your PDF)
Output: FileName (path to save the new PDF)
PageRange: The range of pages to extract (e.g., "1-3" or "1,3,5")
Example:
Automation Anywhere
Automation Anywhere offers commands for handling PDF operations. Here are some
examples:
2. Extract Text:
3.Split PDF:
This command splits a PDF into multiple files based on page ranges.
File Path: Specify the path of the PDF
Output Directory: Specify the directory to save the split PDFs
Page Ranges: Specify the page ranges to split (e.g., "1-3, 4-6")
Example:
PDF File: C:\path\to\your.pdf
Output Directory: C:\path\to\output\
Page Ranges: 1-3, 4-6
Examples
UiPath
UiPath provides activities for FTP operations within the UiPath.FTP.Activities package.
Here are some common FTP activities:
Example:
Server: "ftp://your-ftp-server.com"
Port: 21
Username: "your-username"
Password: "your-password"
2.Upload File:
Example:
LocalPath: "C:\path\to\local\file.txt"
RemotePath: "/path/on/ftp/server/file.txt"
LocalPath: "C:\path\to\local\file.txt"
RemotePath: "/path/on/ftp/server/file.txt"
3.Download File:
Example:
RemotePath: "/path/on/ftp/server/file.txt"
LocalPath: "C:\path\to\local\file.txt"
4.Delete File:
Example:
RemotePath: "/path/on/ftp/server/file.txt"
5.List Files:
Example:
RemotePath: "/path/on/ftp/server/directory"
Example in UiPath
<Body>
<UploadFile LocalPath="C:\path\to\local\file.txt"
RemotePath="/path/on/ftp/server/file.txt" />
</Body>
</WithFTPSession>
Automation Anywhere
Automation Anywhere offers FTP commands within its Workbench. Here are some
common commands:
1. FTP: Connect:
Example:
Server: "ftp://your-ftp-server.com"
Port: 21
Username: "your-username"
Password: "your-password"
Example:
Example:
Example:
Example:
Server: ftp://your-ftp-server.com
Port: 21
Username: your-username
Password: your-password
Using the FTP activities in UiPath and the FTP commands in Automation Anywhere, you can
automate file transfers to and from FTP servers. Whether you need to upload, download,
delete, or list files, these RPA tools provide the necessary functionalities to handle FTP
operations efficiently.
PGP Command:
Integrating PGP (Pretty Good Privacy) encryption and decryption in RPA (Robotic Process
Automation) involves using built-in commands or scripting capabilities provided by the RPA
tools. Here’s how to handle PGP operations using UiPath and Automation Anywhere.
### UiPath
UiPath does not have built-in activities for PGP operations directly, but you can use custom
activities or invoke command-line utilities to perform PGP encryption and decryption.
```vbnet
Dim process As New System.Diagnostics.Process()
Dim startInfo As New System.Diagnostics.ProcessStartInfo()
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
startInfo.FileName = "gpg"
startInfo.Arguments = "-e -r recipient@example.com -o C:\path\to\
encrypted_file.gpg C:\path\to\file.txt"
process.StartInfo = startInfo
process.Start()
process.WaitForExit()
```
```plaintext
FileName: "gpg"
Arguments: "-e -r recipient@example.com -o C:\path\to\encrypted_file.gpg C:\path\
to\file.txt"
```
```vbnet
Dim process As New System.Diagnostics.Process()
Dim startInfo As New System.Diagnostics.ProcessStartInfo()
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
startInfo.FileName = "gpg"
startInfo.Arguments = "-d -o C:\path\to\decrypted_file.txt C:\path\to\
encrypted_file.gpg"
process.StartInfo = startInfo
process.Start()
process.WaitForExit()
```
Automation Anywhere also does not have built-in PGP commands, but you can use the
command-line interface to perform PGP operations.
```plaintext
Script Type: Shell Script
Script:
"gpg -e -r recipient@example.com -o C:\path\to\encrypted_file.gpg C:\path\to\
file.txt"
```
```plaintext
Script Type: Shell Script
Script:
"gpg -d -o C:\path\to\decrypted_file.txt C:\path\to\encrypted_file.gpg"
```
### Summary
To perform PGP operations in UiPath and Automation Anywhere, you can leverage
command-line utilities like GnuPG and use the RPA tools' capabilities to run these
commands. This approach allows you to integrate PGP encryption and decryption into your
RPA workflows seamlessly. Always ensure that the necessary PGP software is installed and
properly configured on the machines running the RPA processes.
Here's how to perform Object Cloning using two popular RPA tools: UiPath and Automation
Anywhere.
### UiPath
In UiPath, the concept of Object Cloning is typically handled through the use of UI
Automation activities. These activities allow you to interact with various UI elements on the
screen.
1. **Recording**:
- Use the Recording feature to capture user interactions with an application. UiPath offers
different recording options like Basic, Desktop, Web, and Citrix.
- These recordings generate a series of UI Automation activities that simulate the recorded
actions.
- **Find Element**: Searches for a UI element and returns it for further actions.
2. Use the **Indicate on Screen** feature to select the button you want to click.
```xml
<Click>
<Target>
</Target>
</Click>
```
3. **Fine-Tuning Selectors**:
- You may need to fine-tune the selectors to ensure reliability. This can be done in the
properties panel of the activity.
- This command allows you to capture and interact with objects within applications,
including web browsers and desktop applications.
1. Drag and drop the **Object Cloning** command into your task.
- **Action**: Choose the action you want to perform, such as `Click`, `Set Text`, `Get Value`,
etc.
- **Object Details**: Automation Anywhere will populate the object properties such as
Class, Type, Path, and Value.
```plaintext
Action: Click
Class: button
Type: submit
Path: /html/body/div/form/button
Value: Submit
```
- For more complex scenarios, you might need to adjust properties like `Match Index` or
use advanced settings to handle dynamic objects.
### Summary
Object Cloning in RPA tools like UiPath and Automation Anywhere allows you to automate
interactions with UI elements that are otherwise difficult to automate. By using UI
Automation activities in UiPath or the Object Cloning command in Automation Anywhere,
you can effectively simulate user interactions and automate processes across different
applications.
- **Automation Anywhere**: Use the Object Cloning command to capture and manipulate UI
elements in web and desktop applications.
Both methods provide robust solutions for handling complex UI elements and ensuring your
automation processes are reliable and efficient.
Error handling is a crucial aspect of building robust RPA (Robotic Process Automation)
workflows. Proper error handling ensures that your automation can gracefully recover from
unexpected issues and continue executing or log the errors for further analysis.
UiPath provides various activities and mechanisms for error handling, such as Try Catch
blocks, Global Exception Handler, and specific activities like Retry Scope.
- The Try Catch activity is used to handle exceptions that occur within a specific scope of
activities.
2. Place the activities you want to monitor for errors inside the **Try** section.
3. Configure the **Catch** section to handle exceptions. You can specify the type of
exception you want to catch and define the actions to take when an error occurs.
```xml
<TryCatch>
<Try>
<Click>
<Target>
</Target>
</Click>
</Try>
<Catch>
<System.Exception>
</System.Exception>
</Catch>
</TryCatch>
```
4. **Finally** section (optional): Place activities here that should run regardless of whether an
error occurred or not, such as cleanup operations.
- A Global Exception Handler is a workflow that handles exceptions on a global level. It’s
useful for capturing and managing unexpected errors throughout the entire automation
project.
- The Retry Scope activity retries a block of activities until a condition is met or the
specified number of retries is exhausted.
Automation Anywhere provides error handling through the Try-Catch-Finally construct and
specific error handling commands.
1. **Try-Catch Block**:
- Automation Anywhere allows you to use Try-Catch blocks to handle errors.
2. Place the activities you want to monitor for errors inside the **Try** block.
```plaintext
Try
Catch
Finally
End Try
```
3. Drag the **Catch** command into the task to handle exceptions. You can use system
variables like `$ErrorMessage$` to capture error details.
4. (Optional) Use the **Finally** command to specify activities that should run regardless of
whether an error occurred or not, such as cleanup operations.
- Automation Anywhere provides the `On Error` command to define specific actions to take
when an error occurs.
#### Example: Using On Error in Automation Anywhere
2. Configure the action to take when an error occurs, such as logging the error, sending an
email, or taking a screenshot.
```plaintext
On Error
End On Error
```
### Summary
Error handling in RPA ensures your automation scripts can handle unexpected issues
gracefully and maintain stability. Both UiPath and Automation Anywhere provide robust
mechanisms for error handling through Try-Catch blocks and other error handling
constructs.
- **UiPath**: Use Try Catch activity, Global Exception Handler, and Retry Scope for error
handling.
- **Automation Anywhere**: Use Try-Catch blocks and On Error commands for error
handling.
Implementing these error handling strategies will help you create more resilient and reliable
automation workflows.
Managing Windows controls in RPA (Robotic Process Automation) involves interacting with
different elements of Windows applications, such as buttons, text fields, checkboxes, and
other UI components. Both UiPath and Automation Anywhere provide commands and
activities to handle these interactions effectively.
### UiPath
In UiPath, managing Windows controls is typically done using UI Automation activities. These
activities allow you to interact with various UI elements within Windows applications.
1. **Click**:
Example:
```xml
<Click>
<Target>
</Target>
</Click>
```
2. **Type Into**:
Example:
```xml
<TypeInto>
<Target>
</Target>
<Text>"Hello, World!"</Text>
</TypeInto>
```
3. **Get Text**:
Example:
```xml
<GetText>
<Target>
</Target>
<Output>
<Text>[extractedText]</Text>
</Output>
</GetText>
```
4. **Find Element**:
Example:
```xml
<FindElement>
<Target>
</Target>
<Output>
<Element>[foundElement]</Element>
</Output>
</FindElement>
```
Automation Anywhere provides the `Manage Windows Control` command to interact with
Windows application controls.
1. **Manage Windows Control**:
- This command allows you to perform actions like clicking, setting text, getting text, and
other interactions with Windows application controls.
- Drag and drop the `Manage Windows Control` command into your task.
2. **Select Action**:
- Choose the action you want to perform, such as `Click`, `Set Text`, `Get Text`, etc.
3. **Capture Object**:
- Click on the `Capture Object` button to select the UI element on the screen.
4. **Configure Action**:
```plaintext
Action: Click
- Drag and drop the `Manage Windows Control` command into your task.
2. **Select Action**:
3. **Capture Object**:
4. **Configure Action**:
```plaintext
```
- Drag and drop the `Manage Windows Control` command into your task.
2. **Select Action**:
3. **Capture Object**:
4. **Configure Action**:
```plaintext
```
### Summary
Managing Windows controls in RPA involves using specific commands and activities
provided by the RPA tools to interact with UI elements in Windows applications. Both UiPath
and Automation Anywhere offer robust features to handle these interactions efficiently.
#### Key Points:
- **UiPath**: Use UI Automation activities such as Click, Type Into, Get Text, and Find Element.
- **Automation Anywhere**: Use the Manage Windows Control command to perform actions
like clicking, setting text, and getting text from UI elements.
Implementing these commands effectively allows you to create robust and reliable
automation workflows that can interact seamlessly with Windows applications.
A Workflow Designer:
A Workflow Designer in RPA (Robotic Process Automation) is a visual tool that allows users
to design, configure, and manage automation workflows. It provides a graphical interface
where users can drag and drop activities or commands to build automation processes. Both
UiPath and Automation Anywhere have robust Workflow Designers that facilitate the
creation of automation tasks.
1. **Drag-and-Drop Interface**:
- Users can drag activities from the Activities pane and drop them into the workflow
canvas.
2. **Activity Pane**:
- Contains a library of pre-built activities categorized by functionality (e.g., UI Automation,
Data Manipulation, System Activities).
3. **Properties Pane**:
- Allows users to configure the properties of selected activities, such as input parameters,
output variables, and other settings.
- Users can create and manage variables and arguments to pass data between activities.
- Includes activities like Sequences, Flowcharts, If, Switch, For Each, While, and Do While for
controlling the flow of the automation.
6. **Error Handling**:
- Provides Try Catch activities and global exception handlers to manage errors and
exceptions.
- Drag a **Sequence** activity from the Activities pane to the designer canvas.
- Within the Sequence, drag a **Type Into** activity to simulate typing into a text field.
- Configure the **Type Into** activity by setting the target selector and the input text.
- In the **Catch** block, add a **Log Message** activity to log any exceptions.
- Run the workflow to test the automation and ensure it performs as expected.
1. **Task Editor**:
- Provides a drag-and-drop interface to add and configure commands for the automation.
2. **Command Library**:
3. **Properties Pane**:
- Users can configure command properties, such as input values, output variables, and
settings.
4. **Control Room**:
- Open Automation Anywhere and create a new task in the Task Editor.
- Use the **Error Handling** commands to define actions when errors occur.
- Drag an **On Error** command to the task and specify actions like logging the error or
sending a notification.
### Summary
The Workflow Designer in both UiPath and Automation Anywhere provides a user-friendly,
visual interface for creating and managing automation workflows. It allows users to leverage
pre-built activities and commands, configure properties, manage variables, and implement
error handling to build robust automation processes.
- **UiPath**: Uses UiPath Studio with a rich set of activities, control flow elements, and error
handling features.
- **Automation Anywhere**: Uses Automation Anywhere Control Room with a task editor,
comprehensive command library, and error handling capabilities.
Both platforms offer powerful tools for designing, developing, and managing automation
workflows, catering to the needs of both technical and non-technical users.
Report Designer:
A Report Designer in RPA (Robotic Process Automation) is a feature or tool that allows users
to design, generate, and manage reports based on the data and outcomes produced by
automation workflows. These reports are essential for analyzing the performance of
automation processes, identifying bottlenecks, and making data-driven decisions to optimize
workflows.
UiPath does not have a standalone "Report Designer" tool, but it provides various methods
to create and manage reports:
#### Key Features and Methods
- Extensive logging capabilities allow you to capture and log data during automation
processes using activities like **Log Message** and **Add Log Fields**.
- Use UiPath’s Excel activities (e.g., **Write Range**, **Write Cell**, **Append Range**) to
generate reports in Excel.
3. **Orchestrator Analytics**:
- UiPath Orchestrator provides built-in dashboards and analytics for monitoring robots,
processes, and queues.
- Customizable dashboards and the ability to export data for further analysis.
- Export data from UiPath and integrate with Business Intelligence (BI) tools like Power BI,
Tableau, or others for advanced reporting and visualization.
- Collect data during the automation process using activities like **Get Text**, **Read
Range**, or **Get Attribute**.
2. **Log Data**:
- Use Excel activities to write the collected data into an Excel file.
```xml
<Sequence>
</Sequence>
```
4. **Format Report**:
- Use additional Excel activities to format the report (e.g., set headers, apply styles).
Automation Anywhere offers more defined tools for creating and managing reports,
including the Bot Insight feature:
- Users can create custom dashboards and reports to visualize the performance and results
of bots.
- Use logging commands to create detailed logs that can be analyzed for reporting.
- Use Excel commands (e.g., **Excel Open**, **Excel Write Cell**, **Excel Save**, **Excel
Close**) to generate detailed reports.
- Use Automation Anywhere commands to collect data during the bot execution.
2. **Log Data**:
```plaintext
Excel Save
Excel Close
```
4. **Format Report**:
### Summary
Both UiPath and Automation Anywhere provide robust features for creating and managing
reports from RPA workflows. While neither platform has a standalone "Report Designer,"
they offer extensive capabilities for logging, data collection, and integration with external
reporting tools to create comprehensive and insightful reports.
- **UiPath**: Utilize logging activities, Excel activities, Orchestrator analytics, and integration
with BI tools for reporting.
- **Automation Anywhere**: Leverage Bot Insight, logging commands, Excel commands, and
integration with BI tools for reporting.
These features enable users to create detailed reports that help in monitoring and optimizing
RPA processes, thereby enhancing overall efficiency and effectiveness.