0% found this document useful (0 votes)
34 views52 pages

Lesson 7 - Automation Concepts and Techniques

Uploaded by

953621243060
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)
34 views52 pages

Lesson 7 - Automation Concepts and Techniques

Uploaded by

953621243060
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/ 52

RPA Design and

Development
v4.0
Lesson 7 Automation Concepts and Techniques
Agenda

1 Extraction and Its Techniques

2 Automation Techniques
Learning Objectives

1 Explain Extraction and Apply Its Techniques

2 Explain and Use Automation Techniques


Extraction and Its Techniques
• Introduction to Extraction
• Extraction Techniques
• Screen Scraping
• Data Scraping
• PDF Extraction
Introduction to Extraction

Process of retrieving data from a data source for further processing or storage. There are various sources
of data such as:

Extract
data
from

Screen PDF Image Excel Email Citrix


Extraction Techniques

There are several extraction techniques available in Studio. These are:

Get Text Get Full Text


• Screen Scraping

Other Techniques
Extracts a text value Extracts a string and its
Output Actions

from a specified UI information from an


element indicated UI element
using the FullText
screen scraping method
• Data Scraping

Get Visible Text Get OCR Text


Extracts a string and its Extracts a string and its
information from an information from an
indicated UI element indicated UI element • PDF Extraction
using the Native screen using the OCR screen
scraping method scraping method
Screen Scraping

Process of extracting data from a specified UI element or document, such as a pdf file. The Screen
Scraping Wizard enables the user to point at a UI element and extract text from it.

1
Start the Screen
Scraping Wizard from
STEP 1 the Design ribbon in
UiPath Studio.

Select the UI element 2 3


STEP 2 on screen.

Select the Screen


STEP 3 Scraping Method from
the Options panel.
Screen Scraping Methods

There are three screen scraping (or output) methods available in Studio:

FullText Native OCR

Background Extract Text Extracts Supports


Speed Accuracy
Execution Position Hidden Text Citrix
FullText 10/10 100% YES NO YES NO
Native 8/10 100% NO YES NO NO
OCR 3/10 98% NO YES NO YES
FullText

The FullText output method captures all the text from a terminal screen. It is the default method in Studio.
Native

The Native output method works with applications that are built to render text with Graphics Device
Interface (GDI). It can extract the screen coordinates of the text.
OCR

The OCR output method uses the Optical Character Recognition technology, to extract information from
virtual environments. It has three default engines: Google Tesseract, Microsoft MODI, and UiPath Screen
OCR.

Multiple Support for Best with


OCR Preferred Filter Allowed
Languages Color Microsoft
Engines Area Size Characters
Support Inversion Fonts
Tesseract Can be
Small YES YES NO
OCR added
Microsoft Supported by
Large NO NO YES
OCR default
UiPath Screen Supported by
NA NA NA NA
OCR default
Tesseract OCR

This method gets better results for character recognition on smaller size areas and supports color
inversion. It offers multiple customization options.
Microsoft OCR

This method is used to work with Microsoft fonts and large-size images.
UiPath Screen OCR

Extracts a string and associated information about the textual content of images. The UiPath Screen
OCR activity is optimized for usage on screen images.
Classroom Exercise

Demonstrate the use of Screen Scraper Wizard by


scraping text from a UiPath blog post and storing it in a
Notepad File.
• Open a blog post on UiPath website
• Use the Screen Scraper Wizard to scrape text
• Switch between Native, Full Text, and OCR Scraping
Methods to view result qualities in Scrape Result
Preview window
• Store scraped text in a Notepad file using only the Full
Text scraping method
• Save and Close the file
Practice Exercise

Build a workflow using the Screen Scraper Wizard that


scrapes text using the Tesseract OCR scraping method
from an image and stores it in a Notepad.
• Search for “text images” in Google Images
• Pick one image containing text from the search results.
• Scrape the text from the image using Tesseract OCR
• Store text in a Notepad file
Practice Exercise

Build a workflow using the Screen Scraper Wizard that


scrapes text using the Full Text scraping method
and stores it in a Notepad file
• Search for “UiPath” in Google Search
• Scrape information about UiPath shown on the top right
of the result page using the Full Text scraping method
• Store text in a Notepad file
Data Scraping

Process of extracting structured data from a browser, application ,or document to a database, CSV file, or
Excel spreadsheet.

• Extracts all the pattern-based data and stores it into the form of the data
table automatically

• Always generates a container (Attach Browser or Attach Window) with a


selector for the top-level window

• Detects if a table cell is indicated, and asks if the entire table is to be


extracted
Data Scraping Wizard

The data scraping wizard prompts the user to open a browser, application or document from where data is
to be extracted.

Step 1
Opening the
Wizard
Data Scraping Wizard (Contd.)

Step 3
Step 2
Column
Field Selection
Configuration
Data Scraping Wizard (Contd.)

Step 5
Step 4
Correlated Data
Preview Data
Extraction
Data Scraping Wizard (Contd.)

Step 6
Step 04 Step 7
Multiple
Preview Datapage Data Extraction
selection
Classroom Exercise

Demonstrate the use of Data Scrapping Wizard by


scraping the first 100 results from Google search results.
Search “Automation is future” in Google Search
• Extract all site titles and URLs by navigating through the
first ten pages in the search result
• Store scraped data in a CSV file
Practice Exercise

Build a workflow using the Data Scraping Wizard that


scrapes blog post titles from the UiPath Blog from multiple
pages.
• Open the UiPath Blog: www.uipath.com/blog
• Extract all blog titles and URL by navigating through all
pages
• Store scraped data in an Excel file
PDF Extraction

Process of extracting the raw data from PDF documents which can contain text and images. PDFs can be
of two types:

Native PDF Scanned PDF


Activities for PDF Extraction

There are two activities for extracting text from PDFs:

Read PDF Text Read PDF with OCR

• Reads all characters from • Reads all characters from


a specified PDF file and a specified PDF file and
stores them in a string stores it in a string variable
variable. by using OCR technology.

• It extracts text from a • It extracts text from a


Native PDF Scanned PDF
Other PDF Activities

Some other activities related to PDFs in Studio are:

Get PDF Page Count Extract PDF Page Range


• Provides the total number of pages in a • Extracts text from a specified range of
PDF file pages from a PDF document

Export PDF Page As Image Join PDF Files


• Creates an image from a page in a • Joins multiple PDF files stored in an array
specified PDF file of strings into a single PDF file

Extract Images From PDF Manage PDF Password


• Extracts images from a specified PDF file • Manages the password of a specified
and saves them in a folder PDF file if current password is known
Classroom Exercise

Demonstrate the use of Read PDF Text activity by


extracting text from a PDF file and storing it in a Notepad
file.
• Install the dependency UiPath.PDF.Activities
• Go to https://www.uipath.com/resources/automation-
whitepapers and download a PDF whitepaper
• Open the downloaded PDF file
• Scrape the text from the file using the Read PDF Text
activity
• Save the scraped text directly in a .txt file
Practice Exercise

Build a workflow using the Read PDF Text activity and


extract only Email IDs and Phone Numbers from a PDF file
and store in a MS Word file.
• Download the practice excel file available on
www.rpachallenge.com
• Convert the file to PDF to use in this exercise
• Read data from the PDF file using a Read PDF Text
activity
• Extract only Phone Numbers and email IDs from the
PDF and store it in an MS Word file
Automation Techniques
• Workbook and Excel Automation
• Email Automation
Excel and Workbook

There are various components in an Excel file:

Cell: The basic data


storage unit in an Excel
file, identified with a Row: A horizontal
vertical and a horizontal line of entries,
coordinate uniquely identified

Column: A vertical line


of entries, uniquely
identified

Workbook: A collection
of worksheets used for Worksheet: A single
organizing tabular data spreadsheet that
contains cells, organized
by rows and columns
Manipulating Workbooks

Studio offers two sets of activities to access and manipulate workbooks:

01 02

Workbook Activities Excel Activities


• All workbook activities are executed in • Studio opens Excel just like a human
the background • Requires Microsoft Excel to be
• Doesn't require Microsoft Excel to be installed on the computer. If the file
installed on the computer isn't open, it will be opened, saved and
• Is faster and more reliable for some closed for each activity
operations when the user doesn’t open • All activities can be set to either be
the file visible to the user or run in the
• Works only for .xlsx files background
• Works with .xls and .xlsm, and it has
some specific activities for working with
.csv
Common Activities for Workbook and
Excel Automation

Append Get Table


Read Cell
Range Range

Adds the information from a DataTable to Locates & extracts the range of an Excel Reads the content of a given cell & stores
the end of a specified Excel spreadsheet. table from a specified spreadsheet. as a string.

Read Cell Read


Read Range
Formula Column

Reads the formula from a given cell & Reads a column starting with a cell Reads a specified range and stores it in a
stores it as a string. inputted by the user. DataTable.

Read Row Write Cell Write Range

Reads a row starting with a cell inputted by Writes a value into a specified cell. Writes the data from a DataTable variable
the user. in a spreadsheet starting with the cell
indicated in the StartingCell field.
Classroom Exercise

Demonstrate the use of Read Range activity by printing


data from a workbook in the output panel.
Create an excel file containing ages of ten students
• Read the data using the Read Range activity
• Loop through each data and subtract it with current year
to get the year of birth
• Display the result in the Output panel
Practice Exercise

Build a workflow using the Read Range and Append


Range activity to read data from a workbook and append
that data to another workbook.
• Create an excel file containing names of any five cities in
Lowercase
• Read the data from the file using the Read Range
activity
• Convert all city names in Uppercase
• Add the updated names in a new spreadsheet using the
Append Range activity
Excel Application Scope

The integration with Excel is enabled by using an Excel Application Scope container. All the other
activities used to work with the specified Excel file are placed inside the container.

The full path to the


Excel workbook
Saves the file when the
workflow exits the scope
Creates new file if the
one entered does not
exist If checked, it opens and reads
the file using Microsoft Excel.
All the activities performed are
visible, and multiple operations
Prevents editing or can be performed at the same
writing to the file in time
scope
Activities Specific to Excel App
Integration

Range Activities: Sheet Activities:


• Insert/Delete Columns • Get Workbook Sheet
Read data, insert & delete rows & Perform various actions over the
• Insert/Delete Rows • Get Workbook Sheets
columns, & copy/paste ranges. sheets in an Excel file.
• Select Range • Copy Sheet

Table Activities: PivotTable Activities:


• Filter Table • Refresh Pivot Table
Create, filter and sort tables Facilitate working with pivot tables
• Sort Table • Create Pivot Table
directly in Excel files. in Excel files.
• Create Table

File Activities: Macro Activities:


• Close Workbook • Execute Macro
Work directly with the Excel files, Execute macros already defined in
• Save Workbook • Invoke VBA
either by saving or closing them. the Excel file or invoke from other
files.

Cell Color Activities:


Capture and modify the • Get Cell Color
• Set Range Color
background color of cells in Excel
files.
Techniques for Excel Automation: How
to Read from an Excel Spreadsheet

Drag and drop an


“Excel Application
Scope” activity
Ctrl+K to store
Drag and drop a the read data
“Read Range”
activity
Techniques for Excel Automation: How
to Write to an Excel

Drag and drop an


“Excel Application
Scope” activity

Write Range
activity to write
the already read
data in the excel
file
Classroom Exercise

Demonstrate the use of Excel activities by reading


and writing in Excel by comparing the first two
columns and inserting result in the third column.
Create an excel file containing ten random numbers
between 1 to 100 in two columns
• Read file and transport into data table, and add a
third column
• If value in the first column is greater than the
second column, enter “Greater” in the third
column as the result
• If value in the first column is less than the
second column, enter “Lesser” in the third
column as the result
• If value in the first column is equal to the
second column, enter “Equal” in the third
column as the result
• Write back the updated data table in the same
excel file in a new sheet
Practice Exercise

Build a workflow that calculates total monthly deposit of a


bank from an Excel file and store output in a new sheet.
• Download the Excel file link given for practice
• The file contains three deposit categories – Cash In, On-
Us Check, and Not On-Us Check
• Calculate the total amount received in all three
categories for June
• Store calculated values in a new sheet in the same excel
file
Note: Download initial Excel data for this practice from:
www.uipath.com/hubfs/Documentation/WorkflowExamples/
QueueItem_Example_Reports.xlsx
Email Automation

The process of automating several tasks related to emails in order to handle them efficiently with minimal
effort. Two situations for interacting with emails are:

Email as input Email as output


Automation uses information from Automation generates and sends an
an incoming email email according to the set rules
Email Protocols

Email protocol is a method by which a communication channel is established between two computers,
and email is transferred between them. Depending on the scope of automation, different sets of activities
and protocols can be used. The email protocols are:

IMAP
Microsoft Exchange
POP3

Microsoft Outlook

SMTP IBM Notes


Categories for Email Automation

Studio includes activities for sending, retrieving and organizing messages. The available categories are:

Generating & sending Retrieving messages


automated messages & extracting data
Done using: Done using:
• SMTP • POP3
• Outlook • Outlook
• Exchange • IMAP
• IBM Notes • Exchange
• IBM Notes

Managing messages Saving attachments Saving messages


Done using: Done using: Done using:
• Outlook • Generic Email • Generic Email
• IMAP Activities Activities
• Exchange
• IBM Notes
Email Protocols and Related Activities

SMTP POP3 IMAP

• Simple Mail Transfer Protocol • Post Office Protocol • Internet Message Access
• Mail servers and other mail • Protocol for reading Protocol
transfer agents use the SMTP messages • Offers useful features to mark
protocol to send mail messages as read or move
• Input via email. POP3 can be
messages on TCP port 25 them between folders
also used to retrieve email
• Email as output. SMTP can be from Gmail • Input via email. IMAP can be
used with Gmail to send also used to retrieve email
• Studio Activity:
emails from Gmail
• Studio Activity: • Studio Activities:
Email Protocols and Related Activities
(Contd.)

Microsoft Exchange Microsoft Outlook


IBM Notes

• Microsoft’s enterprise email • Personal information • Personal mail, calendar, and


solution manager from Microsoft schedule manager

• Sends and receives emails • Used as an email client • Desktop workflow application
that provides instant
• Studio Activities: • Sends and receives emails messaging, emails,
• Studio Activities: calendars, blogs, etc.
• Studio Activities:
Categories for Email Automation

There are two generic email activities available for saving email attachments and email messages on the
local drive.

Save Attachments Save Mail Message

• Saves the mail message • Saves the email message to


attachments to the specified the specified folder
folder
Classroom Exercise

Demonstrate the use of Get IMAP Mail Messages by


extracting information(From, Subject, and Body) from
emails and storing it in a CSV file.
• Set up an IMAP configuration to access the email
• Loop through each email and extract From, Subject, and
Body
• Store extracted data in an excel file in three different
columns with header names as From, Subject, and Body
Classroom Exercise

Demonstrate the use of Get Outlook Mail Messages by


extracting information(From, Subject, and Body) from
emails and storing it in an Excel file.
• Use the Get Outlook Mail Messages activity to identify
Outlook mail folder
• Loop through each email and extract From, Subject, and
Body
• Store extracted data in an excel file in three different
columns with header names as From, Subject, and Body
Practice Exercise

Build a workflow that extracts attachments from emails


containing the word “Resume” in its subject.
• Set up IMAP configuration to access the email.
• Loop through each email to identify subjects containing
the word “Resume”
• Download the attachments from the identified emails in a
folder

Note: Send 4-5 Test emails to the email ID that you will use
for practice. Emails must contain file attachments and the
word “Resume” in their subject
Summary

1 Extraction and Its Techniques

2 Automation Techniques

You might also like