0% found this document useful (0 votes)
69 views70 pages

Robotic Process Automation Rithik

This document is a practical journal submitted for the Master of Science in Information Technology at Laxman Devram Sonawane College, focusing on Robotic Process Automation (RPA). It includes various practical exercises covering RPA basics, decision making, recording types, Excel automation, email automation, and more, demonstrating the application of UiPath for automating tasks. The journal serves as a certification of the completion of RPA practicals as prescribed by the University of Mumbai for the academic year 2024-25.

Uploaded by

monikashinde8190
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views70 pages

Robotic Process Automation Rithik

This document is a practical journal submitted for the Master of Science in Information Technology at Laxman Devram Sonawane College, focusing on Robotic Process Automation (RPA). It includes various practical exercises covering RPA basics, decision making, recording types, Excel automation, email automation, and more, demonstrating the application of UiPath for automating tasks. The journal serves as a certification of the completion of RPA practicals as prescribed by the University of Mumbai for the academic year 2024-25.

Uploaded by

monikashinde8190
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

PRACTICAL JOURNAL

in

ROBOTIC PROCESS AUTOMATION


Submitted to

Laxman Devram Sonawane College, Kalyan (W) 421301


in partial fulfilment for the award of the degree of

Master of Science in Information Technology

(Affiliated to Mumbai University)

Submitted by

Rithik Panneerselvam Nadar


Under the guidance of
Dr. Nrupura Dixit

Department of Information Technology


Kalyan, Maharashtra

Academic Year 2024-25


The Kalyan Wholesale Merchants Education Society’s

Laxman Devram Sonawane College,


Kalyan (W) 421301

Department of Information Technology


Masters of Science – Part II

Certificate
This is to certify that Mr. Rithik Panneerselvam
Nadar, Seat number , studying in Masters of
Science in Information Technology Part II, Semester IV
has satisfactorily completed the practical of
“ROBOTIC PROCESS AUTOMATION” as
prescribed by University of Mumbai, during the
academic year 2024-25.

Subject In-charge Coordinator In-charge ExternalExaminer

College Seal
INDEX
Pract
Practical Description Sign
No.
1 RPA Basics : Sequences and Flowcharts:
a. Create a simple sequence-based project.
b. Create a flowchart-based project.
c. Automate UiPath Number Calculation (Subtraction, Multiplication, Division
of numbers).
d. Create an automation UiPath project using different types of variables
(number, datetime, Boolean, generic, array, data table)
2 Decision making and looping:
a. Consider an array of names. We have to find out how many of them start
with the letter "a". Create an automation where the number of names starting
with "a" is counted and the result is displayed.
b. Demonstrate switch statement with an example
c. Create an automation To Print numbers from 1 to 10 with break after the
writeline activity inside for each activity
d. Create an automation using Do..While Activity to print numbers from 5 to 1
e. Create an automation using Delay Activity between two writeline activities
to separate their execution by 5 seconds

f. Create an automation to demonstrate use of decision statements (if)


3 Types of Recording:
a. Basic Recording using Toolbar
b. Basic Recording using Notepad
c. Desktop Recording using Tool bar
d. Desktop Recording by creating a workflow
e. Web Recording e.g. Find the rating of the movie from imdb web site
f. Web Recording manually
4 Excel Automation:
a. Automate the process to extract data from an excel file into a data table and
vice versa.
b. Create an automation to Write data to specific cell of an excel sheet.
c. Create an automation to Read data to specific cell of an excel sheet.
d. Create an automation to append data to specific cell of an excel sheet.
e. Create an automation to sort a table of an excel sheet.
f. Create an automation to filter a table of an excel sheet.

g. Choose a repetitive manual task from your workplace or daily life. Design
and implement an RPA bot to automate this task using your preferred RPA tool
5 Different controls in UiPath:
a. Implement the attach window activity
b. Automate using Anchor Base
c. Automate using Element Exists.
d. Automate using Find Children control.
e. Use Get Ancestor control
f. Use Find Relative control
6 Keyboard and Mouse Events:
a. Demonstrate the following activities in UiPath:
i. Mouse (click, double click and hover)
ii. Type into
iii. Type Secure text
b. Demonstrate the following events in UiPath:
i. Element triggering event
ii. Image triggering event
iii. System Triggering Event
c. Automate the process of launching an assistant bot on a keyboard event.
7 Screen Scraping and Web Scraping methods:
a. Automate the following screen scraping methods using UiPath:
a. Full Text
b. Native
c. OCR
b. Demonstrate Data Scraping and display values in Message box.
c. Demonstrate Screen Scraping for a pdf, web page and image file.
8 PDF Automation and Exception Handling:
a. Read PDF With OCR
b. Merge PDF’s into one
c. Get PDF Total Page count Using Regex
d. Extract data from a PDF or Excel file and populate it into a database or
spreadsheet.
e. Extract data from a PDF or Excel file and populate it into a database or
spreadsheet. Implement data manipulation techniques like filtering, sorting, or
data validation.
f. Demonstrate Exception Handling using UiPath
9 Email Automation:
a. Configure Email using UiPath
b. Read Emails
c. Send Email with Attachment
d. Save Email Attachments
e. Reply to Email
10 Orchestrator management and mini project:
a. Deploy bots to Orchestrator
b. Run jobs from Orchestrator
c. Queue Introduction:
i. Add items to Queue
ii. Get Queue item from Orchestrator
d. Build UiPath Chatbot using Google dialogflow
11 RPA Applications:
a. Automate the extraction of data from invoices, validate information, and
update accounting systems.

b. Automate data entry tasks from various sources such as emails, forms, or
documents, and validate data against predefined rules.
c. Automate the process of expense reporting by extracting data from receipts,
categorizing expenses, and generating reports.

d. Automate inventory tracking and management processes, including stock


updates, reordering, and inventory audits.
e. Automate sales order processing tasks such as order entry, validation, and
fulfilment.
12 Prepare the Robotics process automation project on any one of the
following domains:

RPA in Logistics, Intelligent Process Automation, IT Process Automation


Explained, RPA in Banking, RPA in Education, RPA in Telecommunications,
RPA in Healthcare, RPA in Insurance, RPA in Accounting, RPA Challenges,
RPA in Real Estate, RPA in BPO, RPA Security
Practical : 1 Sequences and Flowcharts :

a. Create a simple sequence-based project.


Code :
Print message hello
Step 1: Open a UiPath studio.
Step 2: Select blank process and give a name to create a project.
Step 3: Click on open main workflow.
Step 4: In activity panel search sequence and select sequence and drop in main workflow.
Step 5: Now search for message box and select message box and drop in main workflow.

Step 6: In message box type hello world.


Step 7: click on debug file and select run file.

Output :
b. Create a flowchart-based project.

Code :
Step 1: Open UiPath studio and click on process give name to your project.
Step 2: Click on Open main workflow. Drag and drop flowchart from activities panel.

Step 3: Drag and drop input dailog box inside a flowchart.


Step 4: Create a variable “clgname” and give your input label

Step 5: Drag and drop a message box below input dialog box and enter your message inside
message box.
Step 6: Click on debug file and select run file.

Output :

Actual Output :
c. Automate UiPath Number Calculation (Addition,Subtraction,
Multiplication, Division of numbers).
Code:
Step 1: Open UiPath studio select process and give name to your project and click on create.
Step 2: Click on open main workflow
Step 3: go to activities and select sequence drag and drop.
Step 4: Create 4 integer variable.

Step 5: Select 2 input dialogs from the activities drag and drop. Enter the values in dialog
box.

Step 6 : Select another dialog box for selecting options


Step 7: Select switch activity and assign each case, required condition

Step 8: Repeat the same step as below for all the case.

Step 9: Click on debug file and click on run file:


d. Create an automation UiPath project using different types of
variables (number, datetime, Boolean, generic, array, data table)
Code :
Step 1: Create a blank project and give it a meaningful name.
Step 2: Drag and drop the Sequence activity and give it a name.
Step 3: Create two variables named variable1 and variable2 of int32.
Step 4: Create another variable named Result of int32.
Step 5: Select the Assign activity and assign the variable1 as “5”.
Step 6: Select the Assign activity and assign the variable2 as “10”.
Step 7: Select the Assign activity and assign the Result as “variable1+variable2”.
Step 8: Select the Write Line activity and print the Result value.
Step 9: Run.
String:
Step 1: Create a blank project and give it a meaningful name.
Step 2: Drag and drop the Sequence activity and give it a name.
Step 3: Create two variables named String1 and String2 of String.
Step 4: Select the Assign activity and assign the String1 as “Robotic Process”.
Step 5: Select the Assign activity and assign the String2 as “Automation”.
Step 6: Select the Write Line activity and perform the concatenation method in it.
Step 7: Run.

DateTime:
Step 1: Create a blank project and give it a meaningful name.
Step 2: Drag and drop the Sequence activity and give it a name.
Step 3: Create a variables named Date1 of String.
Step 4: Select Assign activity and assign “Now.ToString” to the variable Date1.
Step 5: Select Write Line activity and Print the above.
Step 6: Select Assign activity and assign “Now.ToShortDateString” to the variable Date1.
Step 7: Select Write Line activity and Print the above.
Step 8: Select Assign activity and assign “Now.ToShortTimeString” to the variable Date1.
Step 9: Select Write Line activity and Print the above.
Step 10: Run.
Practical 2 : Decision making and looping
a. Consider an array of names. We have to find out how many of them
start with the letter "a". Create an automation where the number of
names starting with "a" is counted and the result is displayed.
Code :
Step 1: Open uipath studio and give name to your project.
Step 2: Click on open main workflow. click on new and select sequence.
Step 3 : Select a flowchart and drag and drop multiple assign activity in it.
Step 4: Create 2 variables. One for storing the array of names and other for counting the
number of names in array.

Step 5: Drag and drop for each activity


Step 6: Inside the body section of for each activity, drag and drop if activity and give the
condition for counting the number of occurrence of character ‘a’.

Step 7: Drag and drop a message box below for each activity. Enter the value to be displayed
in the message box.
Output:
Result
b. Demonstrate switch statement with an example
The Switch activity The Switch activity can be used to make a choice. When we have various
options available and want to execute one option, we frequently use the Switch activity. By
default, the Switch activity takes an integer argument. If we want to take a desired argument,
then we can change it from the Properties panel, from the TypeArgument list. The Switch
activity is very useful in the categorization of data according to one's own choice.
Perform the following steps:
1. Add a Sequence activity.
2. Add an Input dialog activity inside the Sequence.
3. Now, create an integer type variable L.
4. Specify the newly created variable's name in the Result property inside the Properties
panel.
5. Add the Switch activity under the Input dialog activity.
6. In the Expression field, set LNPE to check whether the number is divisible by 2 or not.
7. Add a Write line activity to the Default section and type the L5P4USJOH JTBOFWFOOVNCFS
in the text field.
8. Now, create Case 1, add the one other Write line activity to it, and type L5P4USJOH
JTBOPEEOVNCFS
in the text field:
e. Create an automation using Delay Activity between two writeline
activities to separate their execution by 5 seconds
To better understand how the Delay activity works, let us see an example of an automation
that writes two messages to the Output panel with a delay of 50 seconds.
Perform the following steps:
1. First, create a new Flowchart.
2. Add a Write line activity from the Activities panel and connect it to the Start node.
3. Select the Write line activity. Now, type the following text into the Text box:
“Hey, what is your name?”
4. Next, add a Delay activity and connect it to the Write line activity.
5. Select the Delay activity and go to the Properties panel. In the Duration field, set 00:00:50.
This is a 50-second delay between the two logged messages.
6. Take another Write line activity and connect it to the Delay activity. In the Text field, write
“My name is Andrew Ng”:

7. After clicking on the Run button, the Output panel shows the message that delays it by 50
seconds:
f. Create an automation to demonstrate use of decision statements (if)
If-else Activity
Step 1: Create a blank project and give it a name.
Step 2: Drag and drop the Flowchart activity and give it a name.
Step 3: Create a variable name for storing user input.
Step 4: Drag and drop input dialog box.

Step 5: Drag and drop if activity and give the condition.


Step 6: Drag and drop message box inside if activity for displaying the output.

Step 8: Run.

Output:
Result of activity:
Practical 3 : Types of Recording:
a. Basic Recording using Toolbar
This is used to record the actions of applications that have a single window. Basic Recording
uses a full Selector. It works better for applications performing a single action. It is not
suitable for applications with multiple windows.
There are two types of selectors, partial selectors and full selectors. A Full selector has all the
attribute to recognize a control or application. The Basic recording uses full selectors

Please note that, in the preceding image that there are different activities but those
activities are not wrapped inside containers, it is generated by Basic recorder. Basic
recording generates different activities and places them directly in the sequence with full
selector. You have already seen how to automate tasks using the Basic recorder; now, let us
cover other recorders.
b. Basic Recording using Notepad
Steps:
1. Create a new Blank Project and give it an appropriate name. Drag a Sequence activity from
Activity tab.

2. Select Desktop Recording under Recording.

3. Open a new notepad, then on desktop recording click on open application and select
notepad then click ok on the prompt that appears

4. Start recording by clicking on record button in recording panel, then click in the text area
of notepad.
5. In the type into prompt enter the text you want to be typed.
Output:
c. Desktop Recording using Tool bar
This is similar to Basic recording with the added advantage of working with multiple actions.
It is most suitable for automating Desktop applications. Desktop recorder generates Partial
selectors. The Partial selectors, have a hierarchical structure. They are split into parent child
views for recognizing the UI element properly.
Please note in the preceding image there is a Attach Window activities and other activities are
nested under it. This flow is generated Desktop recorder:
Output:
d. Desktop Recording by creating a workflow
Use "double Ui" and automate stuff (Scrape Text, Input Text, Click Button)
Insert the data from the following excel file.

Steps:
1. Create a new Blank Project and give it an appropriate name. Drag a Sequence activity from
Activity tab.

2. Add Excel Application Scope Activity and enter the path of the excel file.

3. Add Read Range and create a DataTable to store the data that will be read by read range.

4. Add Open Application activity, start Double UI then click on “Indicate window on screen”
option and select Double UI.

5. Add For each row in DataTable activity and iterate over DoubleUI datatable.
6. Add three type into activity in the for each activity. Indicate to the three textboxes in the
Double UI app. Enter the DataTable element you wan to enter in the Text attribute.

7. Add two get text activities and create two variables to store the transaction is andtotal.
Indicate these elements to the Get text activities.

In case of Total remove the name attribute from the Edit Selector.
8. Add Click activity and indicate to Accept Button in Double UI.
9. Add three Write Cell Activities to enter the transaction id and total and to Update the status
column. ("E"+(DoubleUI.Rows.IndexOf(CurrentRow)+2).ToString)

10. Finally add a Message Box to print the success of the updation of Excel file.

Output:
e. Web Recording e.g. Find the rating of the movie from imdb web site
Web Recording can be done by using the Web recorder. For recording web actions, the
UiPath extension for that browser should be installed. Otherwise, you will not able to
automate tasks or actions using Web recording. You just have to click on the Setup icon and
then click on Setup Extensions. Now, choose your browser and click on it. The UiPath
extension will be added to your specified browser. Web Recording is similar to Desktop
Recording. You just have to record the actions and save it.
Create a Blank project. Drag and drop a Flowchart activity. Now, click on the Recording icon
and choose Web recording. You can record your actions on the web on your own and then
save it. In our case, we have opened a web page using Google Chrome and logged in to
www.google.com Then, we started the recording by clicking on the Record button of the web
recorder. Next, we typed some text in the search bar of Google and performed the Click
activity. Then, we pressed the Esc key to exit the recording and clicked on the Save and Exit
button. Now, a recording sequence is generated in our Designer panel. Connect this sequence
to the Start node. Hit the Run button to see the result. In the following screenshot, you can
see the sequence generated by the Web recorder:

Before running the UiPath workflow, make sure you are on the Google homepage.
We have seen Web recording and it is very easy. There is also another option to extract
information from websites.
We can easily extract information from websites using data scraping.
Suppose we want to extract data from Amazon's website. Say we want to search for books on
Amazon and extract the search results. Extracting data from websites becomes very easy with
data scraping:
1. Create a blank project and give it a meaningful name. Click Create.
2. Log on to Amazon's website and search for books. A detailed list of books is listed on your
screen:

3. Drag and drop a Flowchart activity on the Designer panel. Now, click on the Data Scraping
icon. A window will pop up.
4. Click on the Next button.
5. You have to indicate the first book's entities. Entities can be name, price, author, and so on.
It is your choice.
6. Lets's, indicate the book's name. After that, it will ask for the next book's entities. Indicate
the second book entity as well. Click on Next.
7. This means you have to indicate the second book's entities: however, the entities will be
the same. If you choose name as the first book's entity then you have to be specific and
choose name as the second book's entity. You should not choose name as the first book's
entity and then choose price as the second book's entity.
8. Again, a window will pop up asking you to configure the columns. You can also extract the
URL. If you want to do this, check the Extract URL checkbox.
9. You can specify the column name as well. Click on the Next button.
10. As you can see, all the book names are extracted to a window. If you want to extract more
columns or more entities, then click on Extract Correlated Data and you have to again
indicate another entity of the book to extract more columns, as we have done previously.
After that, all the data will be extracted and will be added to this table. Here, we have one
column but if you extract more entities, then more columns will be added to this table:
11. Click on the Finish button. If the results of your query span multiple pages, it will ask you
to indicate the page navigation link on the website (Next button of the website that we used to
navigate to another/next page). If the results of your query span multiple pages, click on the
Yes button and indicate the link, otherwise click on the No button.
12. We have clicked on the No button. A data scraping sequence is generated in our
Flowchart. It will also generate a data table. You can retrieve the information from the data
table
f. Web Recording manually
Use "google.com" and automate stuff (Scrape Text, Input Text, Click Button)
Steps:
1. Create a new Blank Project and give it an appropriate name. Drag a Sequence activity from
Activity tab.

2. Select web recording under the recording option.

3. Open a Chrome window and from the web recording dialog select open browser and click
on the Chrome window.

4. In the url dialog enter google.com and press enter.

5. Now start recording by clicking on Record and click on the search button. Type the desired search
and click on the Google search button. The press Esc.
6. Now press save and exit. Add get text activity and select the text you want to scrape.

7. Add message box to print scrapped text.


Practical 4 : Excel Automation
a. Automate the process to extract data from an excel file into a data
table and vice versa

Step:
1. Start project with sequence.

2. Add “Excel Application Scope” and enter the path of excel file

3. Inside body add “Read Range” variable name and datatype as datatable(emp_data) and
range to extract data from excel (blank means entire sheet)

4. Add “Output Data Table” input as “emp_data” output as “emp_table”.


5. “Message Box” to print the result adding variable “emp_table” (here extracted data will be
printed).

6. Insert “excel application scope” and new excel sheet path

7. Insert “Write Range” range from where the data should be pasted and variable “emp_data”.

8. Message Box to print confirmation.

Output :
b,c,d . Create an application automating the read, write and append
operation on excel file.
c. Read cell:
Step 1 : Drag and drop a flowchart activity.
Step 2: Drag and drop read range activity.
Step 3: Specify the path of excel sheet, sheet name as well as the range of cells to read.

Value in excel:

Step 4: Create a variable of type “string” to hold the read data.


Step 5: Create a datatable variable “MyDataTable” of DataTable type.

Step 6: Set the output of Read Range activity to MyDataTable

Step 7: Drag and drop Output Data table activity


Step 8: Select the Activity Output Data Table and set its input to “mydatatable” and output to
“result”
Step 9: Select Message Box activity and configure it to display the “Result” variable
contents.
Step 10: Run the file.

b. Write cell:
Step 1 : Drag and drop a flowchart activity.
Step 2: Select activity “Build Data Table” and enter some data into it
Step 3: Create a data table variable MyDataTable MyDataTable of DataTable type
Step 4: Set the output of Build Data Table activity to MyDataTable
Step 5: Select Excel Application Scope .Specify the path of the excel sheet
Step 6: Select Write Range Activity.
Step 7: Specify the sheet name and range of cells to write Step 8: Set the data table value to
MyDataTable

Step 9: Run
Output:

d. Append range:
Step 1 : Drag and drop a flowchart activity.
Step 2: Select activity “Build Data Table” and enter some data into it
Step 3: Create a data table variable MyDataTable MyDataTable of DataTable type
Step 4: Set the output of Build Data Table activity to MyDataTable
Step 5: Select Excel Application Scope .Specify the path of the excel sheet
Step 6: Select Append Range Activity.
Step 7: Specify the sheet name and range of cells to write
Step 8: Set the data table value to MyDataTable

Step 9: Run
Output:
Practical 5 : Different controls in UiPath
a. Implement the attach window activity.
Step 1. Create a blank project and give it a meaningful name.
Step 2: Drag and drop a Sequence activity on the Designer panel. Also, drag and drop a Click
activity inside the Designer panel.
Step 3 : Open a notepad
Step 4: Double-click on the Click activity and then click on Indicate on screen. Locate the
Notepad icon.
Step 5: Drag and drop the Attach Window activity on the main Designer panel.
Step 6: Double-click on the Attach Window activity. Click on Click Window on Screen and
indicate the Notepad window
Output:
b. Automate using Anchor Base
This control is used for locating the UI element by looking at the UI element next to it. This
activity is used when we have no control over the selector. That means when we do not have
a reliable selector, then we should use the Anchor base control to locate the UI element.
We can use the Anchor base control as explained in the following section:
1. Drag and drop a Flowchart activity on the Designer panel of a blank project. Also, drag and
drop an Anchor base control from the Activities panel. Connect the Anchor base control with
Start.
2. Double-click on the Anchor base control:

3. There are two activities that we have to supply to the Anchor base control: Anchor and
action activities.
4. Drag and drop the Anchor base activity (for example; Find Element activity) in the Anchor
field and Action activity (for example; Type into) in the Drop Action Activity Here field of
the Anchor base control.
The Anchor base activity will find the relative element nearby the element on which you want
to perform the Action, and the Action activity will perform the appropriate action that you
have specified
c. Automate using Element Exists.
This control is used to check the availability of the UI element. It checks if the UI element
Exists or not. It also returns a Boolean result if the UI Element Exists, then it returns true:
otherwise, it returns false.
You can use this control to check for the UI element. In fact, it is good practice to use this
control for UI elements whose availability is not confirmed or those that change frequently
Just drag and drop the Element Exists control from the Activities panel. Double-click on it.
You can see there is an Indicate on screen option. Click on it to indicate the UI element. It
returns a Boolean result, which you can retrieve later from the Exists property. You just have
to supply a Boolean variable in the Exists property in the Properties panel.
Element scope
This control is used to attach a UI element and perform multiple actions on it. You can use a
bunch of actions within a single UI element. Drag and drop the Element scope control and
double-click on this control:

You can clearly see that you have to indicate the UI element by clicking on Indicate on screen
and specifying all the actions that you want to perform in the Do sequence. You can add
many activities inside the Do sequence.
d. Automate using Find Children control
This control is used to find all the children UI elements of a specified UI element. It also
retrieves a collection of children UI elements. You can use a loop to inspect all the children
UI elements or set up some filter criteria to filter out the UI elements.
Drag and drop the Find children control from the Activities panel. Double-click on it to
indicate the UI element that you want to specify. You can indicate it by clicking on Indicate
on screen:

You have to supply a variable of type *&OVNFSBCMF-6*&MFNFOUT in the children


property, as mentioned in the preceding screenshot. This variable is then used for retrieving
the UI elements:
Find element
This control is used to find a particular UI element. It waits for that UI element to appear on
the screen and returns it back.
You can use this control in the same way that you used the other controls. Just drag and drop
this control, and indicate the UI element by clicking on Indicate on screen.
You can specify the variable of type UI element in the Found element property of the Find
Element control to receive the UI element as output.
Find relative element
This control is similar to the Find element control. The only difference is that it uses the
relative fixed UI element to recognize the UI element properly. This control can be used in
scenarios where a reliable selector is not present. Just drag and drop this control, and indicate
the UI element by clicking on Indicate on screen. You can also look for its selector property
after indicating the UI element for better analysis.
e. Use Get Ancestor control
Get ancestor
This control is used to retrieve the ancestor of the specified UI element. You have to supply a
variable to receive the ancestor element as output. You can specify the variable name in the
Ancestor property of the Get ancestor control.
After receiving the ancestor element, you can retrieve its attributes, properties, and so on for
further analysis.

Just drag and drop this control and indicate the UI element by clicking on Indicate on screen.
Indicate on screen
This control is used to indicate and select the UI element or region at runtime. It gives
flexibility to indicate and select the UI element or region while running the workflow. You
just have to drag and drop this control in your project:

Do not confuse this with Indicate on screen written inside any activity like Type into. In
previous examples, we have used Indicate on screen inside various controls (as shown in the
following screenshot). This button is used to locate the region or UI element before the
execution of the workflow, while the Indicate on screen control executes its process after the
execution of the workflow:
Practical 6 : Keyboard and Mouse Events
a. Demonstrate the following activities in UiPath:
i. Mouse (click, double click and hover)
ii. Type into
iii. Type Secure text
.i. Mouse (click, double click and hover)
1. Click Activity

Step 1: Go to uipath studio


Step 2: Click on Workflow and Drag Flow Chart from Activities panal.
Step 3: Double Click on FlowChart.
Step 4 : Drag and drop the Click activity
Step 5: Double click on click activity.
Step 6: Click on indicate on screen and indicate the UI element you want to click on.
Step 7: Now click on run.
Output:

2. Double Click Activity

Step 1: Go to uipath studio


Step 2: Click on Workflow and Drag Flow Chart from Activities panal.
Step 3: Double Click on FlowChart.
Step 4 : Drag and drop the Double Click activity
Step 5: Double click on double click activity.
Step 6: Click on indicate on screen and indicate the UI element you want to click on.
Step 7: Now click on run.
Output:

3. Hover Activity

Step 1: Go to uipath studio


Step 2: Click on Workflow and Drag Flow Chart from Activities panal.
Step 3: Double Click on FlowChart.
Step 4 : Drag and drop the Hover activity
Step 5: Double click on hover activity.
Step 6: Click on indicate on screen and indicate the UI element you want to click on.
Step 7: Now click on run.
Output:

ii Type into
Step1: Add a new sequence and name it as Type into Activity
Step2: Search for Type into Activity in the activity panel and drag it inside the sequence.
Step3: Click on Indicate on Screen and indicate the pointer towards notepad editor.
Step4: Type the message to be printed on the notepad in the editable text section
Step5: Hit the Run Button to see the results.
Output:

iii Type secure text


Step1: Add a new flowchart
Step2: Search for Type secure text Activity in the activity panel and drag it inside the
sequence.
Step3: Click on Indicate on Screen and indicate the pointer towards notepad editor.
Step4: Create a variable of type “securestring” and assign it to SecureText property in the
properties.
Step5:Drag and drop a assign activity.
Step6: Assign the variable created with this value “new
system.net.NetworkCredential(String.Empty,"Test@123").SecurePassword”
Step7: Hit the Run Button to see the results.
Output:
b. Demonstrate the following events in UiPath:
i. Element Trigger
On click element
Steps1: Click on user events select on click element
Step 2: Single click on icon present in the toolbar.
Step 3: Drag and drop message box inside event handler.
Step 4: Write any message you want to display.

Step 5: Run the file.


Step 6: Click the icon which you selected in user event.
Output:

On keypress event
Step1: Click on user events select on key press element
Step 2: Indicate on screen and select the key.
Step 3: Drag and drop message box inside event handler.
Step 4: Write any message you want to display.

Step 5: Run the file.


Step 6: Click the key which you selected in user event.
Output:

ii. Image trigger


Steps1: Click on user events select on click image element
Step 2: Single click on any image present in the screen.
Step 3: Drag and drop message box inside event handler.
Step 4: Write any message you want to display.
Step 5: Run the file.
Step 6: Click the image which you selected in user event.
Output:

iii. System trigger


Step1: Click on user events select on monitor keyboard element
Step 2: Select any key.
Step 3: Drag and drop message box inside event handler.
Step 4: Write any message you want to display.
Step 5: Run the file.
Step 6: Click the key which you selected in user event.
Output:
c. Automate the process of launching an assistant bot on a keyboard
event.
Let us say we want our assistant bot to start automating only when we trigger an event. For
example, the user wants his Robot to open and start typing in the Notepad window when he
presses Alt + W. This can be achieved using the Hotkey trigger. Also, inside the Event
handler, just create or record the sequence of steps to be followed. The detailed procedure has
been explained in the following sections:
1. Drag and drop the Monitor events activity: In this step, we will just drag and drop the
Monitor events activity into the workflow. When we double-click on it, it will look like this:

2. Drag the Hotkey trigger activity: In the next step, we will use the Hotkey trigger activity for
the user to start the automation process. Assign Alt + W to the hotkey so that, when the user
presses this hotkey, the event will be executed:

3. Open Notepad and type into it: Our final step is to record the sequence of the steps to be
performed. In this case, this is to open Notepad and then type into it. For that just use the help
of the Desktop recorder. First, we double-click on the Notepad application in the window as
shown in the screenshot. Select the ClickType as CLICK_DOUBLE from the Properties
panel:
After that, we record the typing action and close the Notepad window. Then click on Do not
Save because you do not want to save your file. The sequence is shown in the following
screenshot:

We have also indicated the anchor to recognize the correct button to be clicked (in this case,
the close window button's anchor is the maximize button). This makes it easier for the Robot
to find the UI element.
Now, on pressing Alt + W the Robot will start executing the sequence.
Practical 7 : Screen Scraping and Web Scraping methods
a. Automate the following screen scraping methods using UiPath:
A. Full Text
B. Native
C. OCR

Full Test
Step1: First we select a new project and give it a name.
Step2: Take a sequence chart in the designer panel.
Step3: Open the notepad and put some text.
Step 4: Select the screen scrapping and select the scrapping method.

Step 5: Drag and drop a message box and give the variable name automatically created.
Step 6: Run the file.
Output:

Native
Step1: First we select a new project and give it a name.
Step2: Take a sequence chart in the designer panel.
Step3: Open the notepad and put some text.
Step 4: Select the screen scrapping and select the scrapping method

Step 5: Drag and drop a message box and give the variable name automatically created.

Step 6: Run the file.


Output:

OCR
Step1: First we select a new project and give it a name.
Step2: Take a sequence chart in the designer panel.
Step3: Open the notepad and put some text.
Step 4: Select the screen scrapping and select the scrapping method.

Step 5: Drag and drop a message box and give the variable name automatically created.
Step 6: Run the file.
Output:
b. Demonstrate Data Scraping and display values in Message box.
Let us see, how to build a data table can be built. First, create an empty project. Give it a
proper name:
1. Drag and drop a Flowchart activity on the Designer panel. Also, drag and drop a Sequence
activity and set it as the Start node.
2. Double click on the Sequence and drag and drop the Build Data Table activity inside the
Sequence activity.
3. Click on the Data Table button. A pop-up window will appear on the screen. Remove both
the columns (auto generated by the Build Data Table activity) by clicking on the Remove
Column icon:

Now, we will add three columns by simply clicking on the + symbol. Specify the column
names and select the appropriate data types from the drop-down list. Click on the OK button.
We will add column /BNF of String Data Type, 3PMM@/P of Int32 type and finally Class of
string type:
Now enter some random values just to insert the data into the rows:

Click on the OK button and our data table is ready. We have to iterate over the data table's
rows to make sure everything works correctly.
5. In order to store the Data Table created by Build Data Table activity, we have to create a
data table variable Mydatatable of DataTable type and in order to store the result of the data
table that we have dynamically built. Also, specify assign the Output property of the Build
Data Table activity with this variable. Specify the data table variable's name there.
6. After our data table is ready, we will iterate the data table's rows to make sure everything
works correctly. Drag and drop the For each row activity from the Activities panel inside the
Sequence activity. Specify the data table variable's name (MyDataTable) in the expression
text box of the For each row activity:

7. Drag and drop the For each row activity from the Activities panel inside the Sequence
activity. Specify the data table variable's name in the expression text box of the For each row
activity:
For each and For each row are two different activities. For each is used to iterate over the
collections, while the For each row activity is used to iterate over the data table rows.
Drag and drop a Message box activity inside the For each row activity. In the Message box
activity, Inside the message box we have to write following string:

This row variable contains all the columns of a particular row. Hence, we have to specify
which column value we want to retrieve by specifying the column name. Instead of the
column name, we can also specify the column index (the column index always starts from
zero). Hit the Run button to see the result.
c. Demonstrate Screen Scraping for a pdf, web page and image file.
Using data scraping, we can build the data table at runtime. Let us consider an example of
extracting data from Amazon's website. Perform the following steps:
1. Drag and drop the Flowchart activity from the Activities panel, and drag and drop the
Sequence activity inside the Flowchart activity.
2. Double-click on the Sequence activity.
3. Drag and drop the Open Browser activity inside the Sequence activity. Specify the URL in
the text box:

4. Click on the Data Scraping icon on the top left corner of UiPath Studio. A window will pop
up. Click on the Next button.
5. Now, there will be a pointer pointing to the UI elements of the web page. Click on the
name of the book:

It will ask you to point to a second similar element on the web page:
6. Point to a second similar element on that web page. Specify the name that you want to give
for that extracted data column. (It will become the column name of the extracted data). Click
on the Next button.
7. A list of names will appear in a separate window.
If you want to extract more information, then click on the Extract correlated data button and
repeat the same process once again (just as we extracted the name of the book from Amazon's
website). Otherwise, click on the Finish Button:

8. It will ask you to locate the next page's button/link. If you want to extract more information
about the product and it spans across multiple pages, then click on the Yes button and point to
the next page's button/link. Then, click on it. If you want to extract only the current page's
data, click on the No button, (you can also specify the number of rows that you want to
extract data from: By default it is 100):
9. Data scraping generates a data table. (In this case, Extractiondatatable is generated.)
Change the scope of Extractiondatatable to the Flowchart so that it is accessible within the
Flowchart activity:

10. Drag and drop the Output data table activity on the Flowchart. Set the Output property of
the Output data table activity as: Extractiondatatable:
11. Connect the Output data table activity to the Data Scraping activity. Drag and drop the
Message box activity on the Designer window. Also create a string variable to receive the text
from the Output data table activity (in our case, we have created a result variable). Specify
the text property of the Output data table activity as the result variable to receive the text
from the Output data table:

12. Connect the Message box activity to the Output data table activity. Double-click on the
Message box and specify the text property as result variable (the variable that you created to
receive the text from the Output data table activity).
13. Hit the Run button and see the result.
Practical 8 : PDF Automation and Exception Handling
f. Demonstrate Exception Handling using UiPath
Steps:
1. Create new project: Open UiPath and create new project by clicking on “Process”
option at the right side of the window.

2. In “New Blank Process” window insert the project name you want in the “Name”
textbox. In “Location” textbox insert the path in which folder you want to save the
project (In normal case you will see the default location of project). In “Description”
textbox insert the project description. Then click on “Create” button.

3. Create a Variable config_Dic of Variable types and Dictionary<String,Object>.

4. Select Activity Try Catch from Activities and Insert sequence in it.
5. Select Activity Assign from Activities and initialize the dictionary.

6. Select activity Read Range from activities to read Excel sheet.

7. Select For Each Row from activities.

8. Select Message Box activity to print Output

9. Add a WriteLine Activity in the Catch Block.

Output:
Practical 9 : Email Automation
c. Send Email with Attachment
SMTP server address: smtp.gmail.com.
Gmail SMTP port (TLS): 587.
Add 3 different attachments as input.
Step:
1. Create a new Blank Project and give it an appropriate name. Drag a Sequence activity
from Activity tab.

2. Add Send SMTP Mail Message Activity enter the recipient email, subject and body of
the email to be sent.

3. Enter the files variable in AttachmentsCollection Attribute. Enter smtp port number in
port
attribute of Host and the hostname in server field. Enter the email and password of the
sender in the Logon email and password.

Output:
Practical 10 : Orchestrator management and mini project
a. Deploy bots to Orchestrator
Deploy the Robot to Orchestrator To deploy our Robot, first of all, it must be connected to
Orchestrator. Ensure that our bot is connected to Orchestrator then follow the given steps to
deploy it:
1. First of all, install UiPath on the machine.
2. Provision the Robot machine and take the Robot key from Orchestrator.
3. After receiving the key go to the Robot configuration panel and enter the key here.
4. Also, you need to enter the Robot key into the configuration URL, which can be found
from the admin section of Orchestrator.
5. Publish the project with publish utility from UiPath. When it is published successfully, it
will display the information shown in the following screenshot:

6. The project has been published in the Orchestrator.


7. To create the environment, go to the home page, click on the ROBOTS option, and click on
the Environments Tab. Then click on the + button:

8. Once the details are filled in, click on Create:


9. After creating the environment, a small window will appear as shown in the following
screenshot, where we can manage the Robot within the environment:

10. After clicking on the + button, a will window pop-up where we can choose the Published
package, as shown in the following screenshot, and then click on the CREATE button:

11. After clicking the Deploy Process button, a window popup will appear where we can
choose the published package, as shown in the following screenshot, and then click on the
CREATE button or
12. Packages can be manually uploaded from the local directory after clicking the View
Packages option and then clicking the Upload button as given in the following screenshot:
PROCESS | View Packages | Upload Packages:

13. Now the package has been deployed to the Orchestrator and is ready to be executed
through the web.
14. Next, click the JOBS option for execution and click on the Start icon as shown:

15. After clicking the Start Job button, the Robot will execute over Orchestrator.
c. Queue Introduction:
i. Add items to Queue.
ii. Get Queue item from Orchestrator
Queues work as a container that stores tasks that need to be implemented. Simply
imagine a group of boys standing in a queue in front of a ticketing counter. The logic is
that the person who goes in first gets out first. First In First Out (FIFO).

Similarly, in the case of Robots, when we have a number of operations that are to be
performed and when the server is busy, then tasks are moved in a queue and they are
implemented on the same logic First In First Out (FIFO).

To create a new queues, search for the Queue option in the Orchestrator Server listed on
the left-hand side and then inside the Queue page, you can add one. It also allows you to
access all those Queues that have already been created. It contains some information
about the task such as the remaining time, progress time, average time, description, and
so on, as listed in the following screenshot:

We can also add queue items from UiPath Studio and there are various activities that
support this feature, which are listed as follows:
• Add Queue Item: This activity is used to add a new item to the queue in
Orchestrator. The status of the item will be New.
• Add Transaction Item: This activity is used to add an item to the queue to begin
transaction and set the status as In Progress. Here we can add custom reference
for each respective transaction.
• Get Transaction Item: This activity is used to get an item from the queue to
process it and set its status as In Progress.
• Postpone Transaction Item: This activity is used to define time parameters
between which transaction should be processed. Here, basically, we will specify
the time interval after which a process will start.
• Set Transaction Progress: Used to assist and create custom progress statuses for In
Progress transactions. To notify its progress if the process crashes. This activity
plays a significant role in tackling troubleshooting processes.
• Set Transaction Status: Used to modify the status of the transaction item; whether
it fails or is successful.

You might also like