Learning Robotic Process Automation
Create Software robots and automate business processes with the leading RPA tool - UiPath
Alok Mani Tripathi
^ • • » .
BIRMINGHAM - MUMBAI
Table of Contents
Preface
Chapter 1: What is Robotic Process Automation? 7 Scope and techniques of automation 8
What should be automated? 8 What can be automated? 9 Techniques of automation 9
Robotic process automation 10 What can RPA do? 12 Benefits of RPA 12 Components of RPA 16
Recorder 16 Development studio 17 Extensions and plugins 17 Bot runner 17 Control center 17
RPA platforms 18 Automation Anywhere 18 UiPath 19 Blue Prism 19 WorkFusion 20 Thoughtonomy 20 KOFAX 21
About UiPath 21 UiPath Studio 22 UiPath Robot 22 UiPath Orchestrator 22
The future of automation 22 Summary 23
Chapter 2: Record and Play 25 UiPath stack 25
UiPath Studio 26 UiPath Robot 27
Types of Robots 27 UiPath Orchestrator 28
Downloading and installing UiPath Studio 29 Learning UiPath Studio 34
Projects 34 The user interface 36
The Ribbon 38
Table of Contents
The Quick Access Toolbar Designer panel Properties panel Activities panel Project panel Outline panel Output panel Library panel Variable panel Argument
Task recorder Advanced Ul interactions
Input methods Output methods
Step-by-step examples using the recorder Emptying trash in Gmail Emptying Recycle Bin
Summary
Chapter 3: Sequence, Flowchart, and Control Flow Sequencing the workflow
What is a Sequence? Activities
Using activities with workflows What Flowcharts are and when to use them
Control flow, various types of loops, and decision making The Assign activity The Delay activity
Example The Break activity
Example The While activity
Example The Do while activity
Example The For each activity
Example The If activity The Switch activity
Example Step-by-step example using Sequence and Flowchart
How to use a Sequence How to use a Flowchart
Step-by-step example using Sequence and Control flow Summary
39 40 40 41 41 42 42 43 43 44 44 52 53 53 54 55 61 67
69 70 70 74 75 78 79 80 80 80 82 82 84 84 86 86 88 88 90 93 93 94 95 96 99
105
Chapter 4: Data Manipulation 107
[ i i ]
i
Table of Contents
Variables and scope Collections Arguments - Purpose and use Data table usage with examples
Building a data table Building a data table using data scraping (dynamically)
Clipboard management File operation with step-by-step example
Read cell Write cell Read range Write range Append range
CSV/Excel to data table and vice versa (with a step-by-step example)
Reading an Excel file and creating a data table by using data from the Excel file Creating a data table and then writing all its data to an Excel file
Summary
Chapter 5: Taking Control of the Controls Finding and attaching windows
Implementing the Attach Window activity Finding the control
Anchor base Element Exists Element scope Find children Find element Find relative element Get ancestor Indicate on screen
Techniques for waiting for a control Wait Element Vanish Wait Image Vanish Wait attribute
Act on controls - mouse and keyboard activities Mouse activities
The Click activity The Double-click activity The Hover activity
Keyboard activities Send hotkey Type into activity Type secure text
108 113 115 117 117 124 132 138 138 140 141 144 148
151
152 154 158
159 160 160 162 162 163 164 164 167 167 167 169 170 170 171 171 171 172 172 172 173 174 174 175 175
[ i i i ]
Table of Contents
Working with UiExplorer 176 Handling events 17g
Element triggering events 179 Click trigger 179 Key press trigger 180
Image triggering events 181 System triggering events 182
Hotkey trigger 182 Mouse trigger 182 System trigger 182
Revisit recorder 183 Basic recording 183 Desktop recording 184 Web recording 185 Citrix 189
Screen Scraping 190 When to use OCR 192 Types of OCR available 194 How to use OCR 195 Avoiding typical failure points 198
Selectors 198 Scope of the variable 199 Delay activity 199 Element Exists 199
Try/Catch 200 toString 200
Summary 200
Chapter 6: Tame that Application with Plugins and Extensions 201 Terminal plugin 202 SAP automation 203
How SAP Automation affects data entry jobs 205 Examples where SAP automation is used commonly 205
Java plugin 206 Why are we using the Java plugin with UiPath Studio? 206
Citrix automation 207 How does the Citrix environment work? 210
Mail plugin 214 PDF plugin 216 Web integration 218 Excel and Word plugins 221
Excel plugin 221 Word plugin 222
Credential management 224
[ iv ]
Table of Contents
Extensions - Java, Chrome, Firefox, and Silverlight 225 Summary 227
Chapter 7: Handling User Events and Assistant Bots 22g What are assistant bots? 230 Monitoring system event triggers 233
Hotkey trigger 233 Mouse trigger 234 System trigger 234
Monitoring image and element triggers 235 An example of monitoring email 236 Example of monitoring a copying event and blocking it 246
Launching an assistant bot on a keyboard event 250 Summary 253
Chapter 8: Exception Handling, Debugging, and Logging 255 Exception handling 255 Common exceptions and ways to handle them 261
Unavailability of Ul element 262 Handling runtime exceptions 263 Orbit reference not set to the instant of an object 263 Index was outside the bounds of an array. Index out of the range 263 Image not found in the provided timeout 264 Click Generic error - cannot use Ul CONTROL API on this Ul node please use Ul Hardware ELEMENTS method 265
Logging and taking Screenshots 265 Client logging 265 Server logging 266
Debugging techniques 266 Setting breakpoints 268 Slow step 270 Highlighting 270 Break 271
Collecting crash dumps 272 Enabling crash dumps 273 Disabling crash dumps 273
Error reporting 273 Enterprise Edition customers 274 Community Edition users 274
Summary 275
Chapter 9: Managing and Maintaining the Code 277 Project organization 278
Picking an appropriate layout for each workflow 278 Blank 279
[ v ]
Table of Contents
Simple process 280 Agent process improvement 280 Transactional business process 281
Breaking the process into smaller parts 283 Using exception handling 284 Making your workflow readable 284 Keeping it clean 285
Nesting workf lows 285 How to nest a workflow inside a single workflow 286
Reusability of workf lows 287 Invoke workflow file 288 Templates 289
Adding a workflow as a template 289 Commenting techniques 290 State Machine 291 When to use Flowcharts, State Machines, or Sequences 294 Using config files and examples of a config file 296 Integrating a TFS server 303 Summary 303
Chapter 10: Deploying and Maintaining the Bot 305 Publishing using publish utility 305
How to publish a workflow in UiPath 306 Writing/editing the published package info into the json file 308
Overview of Orchestration Server 309 Queues 311 Assets 312 Process 314
Deploying a process 316 Using Orchestration Server to control bots 317
Robot statuses 318 Editing the Robot 318 Deleting the Robot 319 Displaying logs for a Robot 319
Using Orchestration Server to deploy bots 320 Creating a provision Robot from the Orchestrator 320
Connecting a Robot to Orchestrator 322 Deploy the Robot to Orchestrator 324
License management 328 Activating and uploading a license to Orchestrator 328
Publishing and managing updates 330 Packages 330 Managing packages 332
Uploading packages 332 Deleting packages 333
[ v i ]
L
Table of Contents
Summary 334
Other Books You May Enjoy 335
Index 339
[v i i ]