This tutorial teaches you 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
- Download the archive with the automation project in this tutorial using the button at the bottom of this page. Extract the archive and copy the file ExcelFile.xlsx to your Desktop.
- 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
- In StudioX Backstage View, select the Start tab, and then, under New Project, select Blank Task.
If you don't want to start from a blank project, select one of the options under New from Template to start from one of the available project templates instead. For more information, see Project Templates.
- Provide the following information:
- 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.
- Location - Browse to a location on your hard drive where to create the process. The default location is
%USERPROFILE%\Documents\UiPath
. - Description - Optionally, enter a brief description to provide more details about the process.
- (Optional) Select Show advanced options to configure the project settings. If you don't select this option, the project is created with the default settings.
- Indicate the Excel file you want to use - 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 file name, browse to a different folder where to create it, or select an existing Excel file. - 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
. - Access password - If applicable, enter the password required to open the file.
- Editing password - If applicable, enter the password required to edit the file.
- 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.
- 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.
- Indicate the Excel file you want to use - 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
- 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.
Step 2: Add the web page and the Excel file to the automation
- In Chrome, navigate to https://www.rpasamples.com/unicornname.
- In StudioX, in the Activities panel, select the App/Web tab, and then double-click the Use Application/Browser activity. The activity is added to the Designer panel.
- In the Use Application/Browser activity, click Indicate Application, 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.
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. - 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.
- In the Use Excel File activity:
- Click Browse to the right of the Excel file field, and then browse to the Desktop and select ExcelFile.xlsx.
- 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.
Step 3: Add the activities to perform in the browser and Excel
- Click Add activity inside the Use Excel File activity, and then locate and select the Repeat actions for rows in Excel range common scenario using the search box at the top of the window. You can easily find it if you start typing Repeat actions for rows In Excel.
A For Each Excel Row activity is added to the Designer panel. - In the For Each Excel Row activity:
- Click Plus on the right side of the In range field, and then select Excel > Sheet1 [Sheet]. Your selection is displayed in the In range field as [Excel] Sheet1.
- 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.
- 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.
- In the Type Into activity:
- 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. 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.
- 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.
- 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.
- In the Click activity:
- 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.
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.
- 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.
- 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.
- 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. - 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.
- 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.
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.
Congratulations! You have just created your first automation. Next, let's go over a few tutorials to learn more about what StudioX can do.
Updated about a year ago