[go: up one dir, main page]

0% found this document useful (0 votes)
71 views18 pages

Introduction UIPathStudioX Practical 3 Excel

This document provides a step-by-step guide for creating an automation project using UiPath StudioX to generate unicorn names from a list in an Excel file. The automation involves reading names from an Excel file, using a web-based unicorn name generator, and writing the generated names back to the Excel file. The project requires the installation of the UiPath extension for Google Chrome and involves multiple activities within StudioX to complete the task.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views18 pages

Introduction UIPathStudioX Practical 3 Excel

This document provides a step-by-step guide for creating an automation project using UiPath StudioX to generate unicorn names from a list in an Excel file. The automation involves reading names from an Excel file, using a web-based unicorn name generator, and writing the generated names back to the Excel file. The project requires the installation of the UiPath extension for Google Chrome and involves multiple activities within StudioX to complete the task.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

COMPETENCY 4 : Install and use UIPath StudioX for RPA

Creating Your First Automation Project

Title : Automation Project : Taking a Name from a List in an Excel File & Enters it
into a website to get the corresponding Unicorn Name and takes the Unicorn Name
and Transfers it into the same excel file right next to the real name.

( Note that the Excel File we have created has 7 names in 7 rows, so we will need to repeat
the steps 7 times )

The project will be using Google Chrome as the platform.

The steps below provide the step by step on how to create a basic task automation project in
StudioX and run it on your machine.

The automation processes an Excel file which contains a column with names and generates a
unicorn name for each of the names using the unicorn name generator at
https://www.rpasamples.com/unicornname.

Each unicorn name is then extracted from the web page and added to another column in the
spreadsheet next to its corresponding name.

Before you begin your Project :

 Copy & Paste the Excel File “ List_Names_RPA_First_Project.xlsx”. to your Desktop


( Available from Pen Drive ) .
 This example uses Google Chrome, which requires the UiPath extension for Chrome to be
installed. To install it, go to Home (StudioX Backstage View) > Tools, and then, under
UiPath Extensions, click Chrome.
 If you want to use Edge or Firefox instead, install the extension for that browser. No
extension is required if you want to use Internet Explorer.

Step 1: Create a new project

1. In StudioX Backstage View, select the Start tab, and then New > Blank Task. ( Fig. 1
below )

1
Fig. 1 – Creating a First RPA Project in UIPath Studio X

2. Provide the following information in the Blank Test Window which opens on
your screen. ( See Fig. 2 below )

Fig. 2 : Blank Test Window

o See Fig. 3 below for the above elements Process name - Enter a name for the

automation project. We recommend using a name that describes the automation you

are going to create, as this will make it easier for you to identify this project among

others later. For this example, we'll use First Automation Project.
2
o Location - Browse to a location on your hard drive where to create the process. The

default location is C:\Users\............\........... \Documents\UiPath

o Description - Optionally, enter a brief description to provide more details about the

process. E.g., Testing the Unicorn Name of List of Persons in an Excel File

See Fig. 3

Optional Steps

3. Select Show advanced options to configure the project settings. If you don't
select this option, the project is created with the default settings.
o Compatibility - Select the project compatibility: Windows, Cross-
platform, or Windows - Legacy. For more information about
compatibilities, see About Automation Projects.
o Notebook file - Indicate an Excel file to use as the Project Notebook, a
scratchpad for Excel data to use in the project. By default, a file named
Project_Notebook.xlsx is created in the project folder. You can edit the
3
file name, browse to a different folder where to create it, or select an
existing Excel file.
o And give it a name for later - Enter a name by which to refer to the
Excel file in the project when an activity interacts with it. The default
name is Notes.
o Access password - If applicable, enter the password required to open
the file.
o Editing password - If applicable, enter the password required to edit the
file.
o Autosave file - Select this option if you want the workbook to be saved
at the end of the automation. Otherwise, the file is returned to the initial
state after execution. This option is not selected by default.
o Read only - Select this option if you want the process to open the file in
read-only mode. This allows you to perform data extraction operations if
the file is locked for editing or has an edit password. This option is not
selected by default.

4. Click Create to create the project.


The project is created and a blank workflow is displayed in the Designer
panel. You can now start building your automation by adding activities. You
can add activities from the Activities panel on the left by double-clicking them
or dragging and dropping them in the Designer panel, or by clicking Add
activity at the center of the Designer panel. ( Fig. 4 )

4
Fig. 4

Step 2: Add the web page and the Excel file to the automation

1. In Chrome, navigate to https://www.rpasamples.com/unicornname. ( Fig. 5 )

2. In StudioX, in the Activities panel, select the App/Web Automation tab, and
then double-click the Use Application/Browser activity. The activity is added
to the Designer panel. ( Fig. 6 )

5
Fig. 6

3. In the Use Application/Browser activity, click Indicate Application to Automate , and


then move the mouse pointer to the page with the unicorn name generator in Chrome. When
the window is highlighted, click anywhere inside it. ( Ensure that the Web page
https://www.rpasamples.com/unicornname is open when carrying out this activity )

The web page is added to the automation, the Use Application/Browser activity name is
updated with the browser and URL (the latter is also added to the Browser URL field) and
with a screenshot of the web page. See Fig. 7 below.

6
Fig. 7

4. In the Activities panel, select the Excel tab, and then drag a Use Excel File
activity and drop it inside the Use Application/Browser activity. ( Fig. 8 )

Fig. 8
5. The Use Excel File window appears in the Activity window as shown below in
Fig. 9

7
Fig. 9

6. In the Use Excel File activity:

o Click Browse for file icon to the right of the Excel file field, and then browse
to the Desktop and select the file name : List_Names_RPA_First_Project.xlsx

o In the field Reference as, leave the default value Excel.


You have indicated that you want to work with the file ExcelFile.xlsx that will be
known in your project as Excel. ( Fig. 10 )

Fig. 10
8
The path of the file appears in the window of the Excel File of the Activity window
as shown Fig. 11 below.

Fig. 11
Step 3: Add the activities to perform in the browser and Excel

1. Click Add activity inside the Use Excel File activity ( the above the
Drop Activity Here ) as shown in Fig. 12 below.

Fig. 12 – Add Activity

9
Then locate and select the Repeat actions for rows in Excel range from the Common
Scenarios using the search box at the top of the window. ( See Fig. 13 )

You can easily find it if you start typing Repeat actions for rows In Excel in the search
window.

Fig. 13 Common Scenarios - Repeat actions for rows in Excel range

A For Each Excel Row activity is added to the Designer panel as shown in Fig. 14 below.

Fig. 14 – For Each Excel Row

10
2. In the For Each Excel Row activity:

 Click Plus on the right side of the In range field, and then select Excel
> Sheet1 [Sheet]. ( See Fig. 15 ) Your selection is displayed in the In
range field as [Excel] Sheet1. ( See Fig. 16 )

Fig. 15

Fig. 16
 Select Has headers to indicate that the first row in the selection is a
header row.
You have indicated that you want to iterate through the rows in Sheet1 of
the Excel file.

3. Click Add activity inside the For Each Excel Row activity, and then locate
and select the Type Into activity in the search box at the top of the window.
The activity is added to the automation. ( See Fig. 17 & 18 below )

11
Fig. 17

Fig. 18

12
4. In the Type Into activity:

o Click Indicate target on screen, then move the mouse pointer on the
What is your name? text box on the unicorn name generator web page.
( Fig. 19 ) When the text box is highlighted, click it. The text box is
identified as the target and the label next to it is identified as an anchor.
Click Confirm in the Selection Options window to save the selection.
An image of the target and anchor is displayed in the Type Into activity.
( Fig. 20 )

Fig. 19

Fig. 20

13
o Click Plus on the right side of the Type this field, and then select
CurrentRow > Name.
You have indicated that, as you are iterating through the rows in the
Excel file, you want to copy the name from the current row in the
iteration and paste it in the text box on the web page.

5. Click Add activity inside the For Each Excel Row activity, below the Type
Into activity, and then locate and select the Click activity in the search box at
the top of the window. The activity is added to the automation. ( See Fig. 21 )

Fig. 21

14
6. In the Click activity:

o Click Indicate target on screen, then move the mouse pointer on the Get
Name button on the unicorn name generator web page. When the button is
highlighted, click it. The button is identified as the target. Click Confirm in
the Selection Options window to save the selection. An image of the target is
displayed in the Click activity. ( See Fig. 22 )

Fig. 22

From the step configured above, you have indicated that, as you are iterating through the
rows in the Excel file, after the name in the current row is copied to the text box on the web
page, you want to click the Get Name button.

15
7. Click Add activity inside the For Each Excel Row activity, below the Click
activity, and then locate and select the Get Text activity in the search box at the top
of the window. The activity is added to the automation. (Figs. 23, 24 & 25)

Fig. 23

Fig. 24

16
Fig. 25

8. In the Get Text activity:

Click Indicate target on screen, then move the mouse pointer on the generated name (by
default, the placeholder text [Unicorn name]) on the unicorn name generator web page.
When the text is highlighted, click it. The text is identified as the target, but no anchor is
automatically detected. Because the unicorn name changes every time it is generated, we
also need to add an anchor to ensure the target is identified when the project is executed.
While still in selection mode, move the mouse pointer to the Your Unicorn Name label
above the text and, when it is highlighted, click it. The label is identified as an anchor and
the Selection Options window displays the message Target & anchors OK. Click Confirm
in the Selection Options window to save the selection. An image of the target and anchor is
displayed in the Get Text activity. ( Figs. 26 & 27 below )

Fig. 26
17
Fig. 27

Click Plus on the right side of the Save to field, and then select CurrentRow > Unicorn
Name.
You have indicated that, as you are iterating through the rows in the Excel file, you want to
copy the generated name from the web page to the Unicorn Name column in the current row
in the iteration.

Step 4: Run the automation

Click Save in the StudioX ribbon to save the project, and then click Run to execute the
automation.

The Excel file is opened and, for each row in it, the name is copied to the web page, a
unicorn name is generated, and then copied to the corresponding cell in the Excel file. After
the automation is completed, the Excel file is saved and closed.

18

You might also like