UI Path Bootcamp | Andrew Seeley | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

UI Path Bootcamp

teacher avatar Andrew Seeley

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

67 Lessons (5h 6m)
    • 1. Introduction

      1:14
    • 2. Installing UI Path

      1:48
    • 3. UI Path Tour

      6:20
    • 4. Hello World

      2:44
    • 5. Structure of this course

      2:01
    • 6. Course Files

      0:30
    • 7. Fundamentals introduction

      2:05
    • 8. Data types

      2:29
    • 9. Variables

      2:29
    • 10. Order System Intro

      2:07
    • 11. Order System Tour

      1:25
    • 12. Login

      8:09
    • 13. [ACTIVITY] Navigate to add order

      1:50
    • 14. Adding an order

      3:34
    • 15. A step back - reusable code with libaries

      8:45
    • 16. Using our library

      8:19
    • 17. Retrieve an order

      8:30
    • 18. [ACTIVITY] Get the rest of the details

      12:41
    • 19. Order system wrapup

      0:48
    • 20. Excel order system intro

      2:05
    • 21. Reading from excel

      14:43
    • 22. Adding the order

      11:06
    • 23. Getting multiple orders

      10:00
    • 24. Saving to excel

      9:59
    • 25. [ACTIVITY] Add the remaining fields

      2:45
    • 26. Filter out orders not found

      3:19
    • 27. Excel order system wrapup

      0:55
    • 28. Business Lookup Intro

      1:11
    • 29. IE Automation

      4:11
    • 30. Chrome automation

      2:49
    • 31. Both at the same time

      9:52
    • 32. Business Lookup Wrapup

      1:07
    • 33. Car list intro

      1:11
    • 34. [ACTIVITY] Adding a car

      2:08
    • 35. Selecting an item from a dropdown

      4:07
    • 36. Fill out the remainder of the fields

      1:31
    • 37. Prompting the user for input

      4:24
    • 38. Dynamic dropdown

      6:36
    • 39. Car list wrapup

      1:12
    • 40. PDF Invoice scraping intor

      2:34
    • 41. Installing Fox It Reader

      1:28
    • 42. Reading an invoice

      3:29
    • 43. Opening the file

      8:22
    • 44. [ACTIVITY] Scraping other details

      3:26
    • 45. The invoice number

      8:10
    • 46. A more robust way to open files

      6:34
    • 47. Looping over files

      10:10
    • 48. Anchors

      12:11
    • 49. Invoice scraping wrapup

      1:26
    • 50. Optical Character Recognition Intro

      0:55
    • 51. Basic OCR

      5:59
    • 52. Screen scraping setup - open file

      5:42
    • 53. Screen scraping with OCR

      5:59
    • 54. [ACTIVITY] Add your own field

      3:52
    • 55. OCR Wrapup

      0:48
    • 56. Machine Learning with Pokemon Intro

      2:34
    • 57. Installing Python locally with Anaconda

      4:28
    • 58. Training the Pokemon model with firebase

      7:17
    • 59. Running our model with Python

      9:28
    • 60. Python in UIPath

      7:02
    • 61. UIPath recognizing a Pokemon

      5:34
    • 62. The really fun part

      4:31
    • 63. Pokemon Wrapup

      1:10
    • 64. Developer Standards

      3:41
    • 65. UI Path Community

      0:40
    • 66. Licencing

      4:47
    • 67. Course Wrapup

      0:57
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

57

Students

--

Projects

About This Class

Ever wish the mundane daily tasks could be automated?

Learn from an instructor who delivers enterprise Automation projects and has been actively involved in engagements that has won global RPA awards.

Intelligent Automation is at the forefront of disruption, also known as the "digital workforce". It is transforming the efficiency of every organization function from finance, tax, HR and IT. This saves hundreds of hours of peoples time to focus on more higher value tasks.

What does this mean for you?

There are HUGE opportunist in this space right now, RPA grew by 63.1% in 2018 to $846 million. It is currently the fasted-growing segment of the global enterprise software market. This course will enable you to get a first mover opportunity in this market, and also prepare yourself if your role is at risk!

What will this course do for you?

This course will give you a clear overview of UI Path.  We will develop our very own process bots to automate common manual processes. Some include inventory management systems, invoice extractions and even recognizing Pokemon!

Further to this we also take a look at the best practices when it comes to implementing your processes in enterprise grade environments, along the way you will also encounter common issues working through to resolve them. Hint - without help this takes up a tremendous amount of time otherwise! All this is taught in a manner that is akin to hands on experience.

Key learning on this course:

  • Understanding of UI¬†Path key concepts

  • Automation various types of applications (Desktop, web)

  • Machine learning basics overview

  • UI¬†Path best practices

Meet Your Teacher

Hi I am Andrew.

I created Seemu Apps to create and share knowledge I have gained on my journey in learning iOS app development. Too often would I look up on how to solve a problem to only find an explanation that seemed to be written in an alien language. As my skills have developed I can understand these solutions, however I remember what it was like to be a novice!

I have been programming since I was in high school and have been developing for iOS for 2 years. I currently have 12 apps on the iOS app store - one of which reached the Top charts in the Lifestyle category for most countries.

My aim is to share my knowledge by creating the courses I wish I had access to when I was learning development.

I also run a youtube channel and website which has quick tut... See full profile

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hi, welcome to you. I power foundations. He said, my name is Andrew silly and I will be your instructor and currently a manager at a consulting firm. And one of my many projects has won an international PIO or by the end of this course, you will have built several automated processes, ranging from invoice extraction, navigating and ordering system, and even using machine learning to recognize Pokemon. Along the way, we will face a common issues you'll encounter during update development. We'll look at how we can solve these issues. And if you haven't seen them before, these takeoff at considerable amounts of time to be able to resolve on your own. Along the way, we will cover how you wipe parties laid out. You are Podcast practices and touch on some machine learning. This course was designed for those looking to know more or wanting to break into the automation industry. The surprising fact is determined it to be an IT guru to build and deploy your first BOD. So come along with me today. Let's build that bought by hitting that Enroll button. 2. Installing UI Path: Okay, if you haven't already, it's time to down-weight UI path can handle it over to you. I popped.com, forward slash product for sludge deer. And somewhere on the page, there should be a big tripod Free button. What you need to do is just click on that. It will ask you to register your email address and details. Once he did that in sign-in, you'll be taken to the cloud interface and there'll be so mad to download the studio or COX. And this is what we need to actually build our processes to automate tasks. So go ahead and download that. And then once that's downloaded, we're just going to run it. And you'll say several options to activate a. It'll be the community licence, standalone lessons K, or getting a less escape from a UI PAF orchestrator. We're going to use accumulate license. It's got everything we need to begin developing our very own automated bots. So go there. And you have two profiles. You have a UI path Studio Pro and UI POS UX community. We're going to use the UI puffs GO PRO will use the stable option. We'll leave the default source control support selected and hit continue. And then you'll have the welcome splash screen. We're going to close that. And now we've installed UI path. You can open it again from the start menu on your computer or the desktop. Search for you apart, it'll be a UI posterior. And that's how we can open it up and get back into it. Now that we've gotta installed, we'll take a tour of it in the next lecture. 3. UI Path Tour: Before we get into creating processes, let's take a quick tour of the UI puffs Julia can say, hey, you've got the landing page on the left-hand side. You've got your menu options. In the middle, you can open a recent projects. And to the right, you can create new projects with various options. The main ones we'll be looking at in this course is creating automated processes. And we'll also explore creating a re-usable library. On the left side, the main thing you need to be aware of is the Tools tabs. These will have various tools, some of which are you IPv6 sentence that don't comment. So it by default. So we will be installing current later on is cost to automate Chrome. And you can automate Firefox at Citrix and so on. So it's just useful to know that this area exists. And then you've just got your general settings for your iPod. What we're going to do, we're going to go back to the start menu, which is the default when you open up UI path, let's just create a new process and explore the options. And so this name is test process. Leave everything as default hit create. And then this is what you'll see when you first come into creating a new process. You see some help text here with the shortcuts. Up the top, you'll see the navigation ribbon. To the left side, you'll see some project data files. Into the right side you have this properties windows. So let's take a look at each of these items one by 1. First 1 is a project. This is just what files within yo-yo wipe off project. The main thing you be concerned about is this mangles him. What if you double-click on that? This opens up your automated process. We didn't have anything in here right now. This is where all your steps to live for automating a UI application, website and so on. Well then your automated process, you'll be using what's called activities. And you can see these activities tab here. The activities would do various things, such as user mouse button to click on an application, type text into inputs, get input content, click on drop-downs, and so on. So you can see there's a significant amount here. Most of the time, we'll be using the such activities to search for a one we want to say we want to click on something where you could search for click. You can see we have this mouse click. You can drag that in. And then this will just click somewhere on the user screen. And then the final tab is a snippets. And this is just little snippets of code. You can say we went BY exploring that too much in this course. Under there we've got various tabs. We've got the apple console. If you click on that, this will just app debug logs. We will be using this because he can actually lock your own custom messages through this set, super-helpful when a process is running, you can actually log out. What is happening step-by-step. Especially useful for when you're doing development. Then you've got the error list. If there's any errors in your project, they will show up here. We will run into some errors in this cause. It's only natural also while you're developing processes on what set you will run into errors. Yes. Ok. And I'll show you how to resolve the ones we run into. So not hot at all. It's just something that you run into automaton again. Then you finally got this fine references and breakpoints, not going to go into detail on those now because we won't be using them too much. And then you can say here we have our main.xml open. This is where our process runs. So typically Oran, step-by-step. So each activity we will link to another activity such as clicking on the screen, talking into import, et cetera. At the bottom here you have several tabs. The main ones where you will be concerned about is the variable tab. This is way can actually store data for use later on in your process. And then you've got arguments. This is why you can actually set up your process to accept data into it when it runs, and actually output data when it finishes running. And we have imports which will display live into the default. Then on the right side we have several tabs here. The main one would be the properties and an outline tab. With the properties. If you click on an activity such as this click, you can say here, it will give us a properties for that selected activity. So you wipe off dot co-author activities, don't click. It will have several options here. And this is the way you set up the settings for that clear, such as, where do you want to click on the screen? Do you want to click on a correspondent of an application? Do you want to click on the Maximize button and do wanna click minimize button? And so on, will be using this extensively throughout this course. So we'll explore that a bit more later. And finally, we've got the outline, which will outline each activity in the middle main.xml file here just in one line for you, this is especially useful if you stop building up a process that goes offspring. And you want to see at a glance as to the structure of it and how it works. That way you can check that out that in the outline tab. Finally, if you want to get back to the main menu, you can click on the Home button. And if we want to go back and we can click on a back button up here. You have various options up the top, the main ones we'll be using is Debug Run file, and that will run our process. And we'll look at some other options such as data scraping on later on. You've also got your day bugs have for advanced debugging. In this course, we'll just be looking at a building, the processes. And if there are errors, will look at it any error list instead. So now it will take them a quick tour of USGS. We're going to create a quick Hello World Book. And then we'll jump into actually creating different types of bots in you wipe off. 4. Hello World: We're going to look at creating our very first robot in under five minutes. So for this one, this is just an example of how quick you can automate tasks and processes, is just an example. I'm just going to go ahead and build it so you don't need to create your own Bach currently. Just follow along. And this is just to get you familiar with how UI path studio with set-up, where all the buttons are, and what it can do. So what we're going to do is we're going to create a new process. This one's going to be called helloworld. Hit Create. And we're going to make it open up notepad and write in some text. So we can see it's opened up here. And what we need to do in integrated project, we need to go to main.xml. This is where the actual code for your outliers. And on the screen here you can see we can drop an activity. What we're going to do is head on over to the activities tab, drag in a sequence. Then we're going to search for open application. Going to drag that in. And we're going to use this to open up Notepad. So I've just opened up Notepad now. And I'll just zoom in here. And in open application we can click indicate window on screen. We're going to select Notepad. And what that will do, this will open up Notepad. And under activities we search, we'll type. We can do. We'll go indicate element inside window. We'll click on Notepad. And we're going to type in hello world inside quotation marks. Will that done? We're going to now close down. Notepad will save our process by clicking on the Save button. Then if we go debug file and run, we can actually run our bought. And we can see here it opens up Notepad and attach in a text hello world without us touching the computer at all. So this could be easily modified to automate any process you could think of, whether it's a desktop application, a website, and so on. Something that's repetitive that you, colleagues or people within an organization do every day. So congratulations on making your first spot. As you can see, UI path makes it so simple to do. It's got a really user-friendly interface. And throughout this course, I'll show you how you can develop bots for various types of applications. As I mentioned, don't worry if all of this doesn't make sense yet, I will go into how it works. I just wanted to show you an example of creating a quick bought from scratch, how easy it is. So let's take a quick break and I'll see you in our next lecture. 5. Structure of this course: Before we dive into the cost, let's just go over the cost structure. What we're going for now is a UI path overview, will then jump into the automation fundamental, which just covers some k technical aspects of automation. You might already be aware of this. And when you get to that section, if you are feel free to skip it. Well then we want to creating seven pots buffers, which will be an ODE system, which will automate a desktop application to place and retrieve orders. We will then integrate that order system with Excel in the next book. In the third part, we're going to look up a business on a website and get details about that business and look at how we can run two separate bought at the exact same time. We'll then have a pot which will add a car to a list on a website. What number five is PDF invoice scraping. So one of the most common task today where you get invoices and you need to extract the details to put them into Excel or some sort of other system. Run through that with PDF files. On bought six will have OCR, which is optical character recognition. So taking a scan a document, how can we extract the text out of that meeting onto the final part, which will be poker x, which will be using a custom machine learning model to actually recognize Pokemon and tell the user what the pokemon was. And finally, move on to some best practices around automation and some key items you just need to be aware of in general, really good to know your content and and then you'll be finished the cost. So looking forward to taking you through this course, if you do have any questions on the way, feel free to pose a question to me and don't forget to check out similar automation on YouTube, where I also cover automation content on the chat soon. 6. Course Files: A quick note before proceeding this cost for each bottom with sometimes is PDF files and image files in a creation of the bot. You can download these files and a Class info on the UI path Foundations course whiles. Within here, there will be a set of files for H bar one, which will contain the files used the correct spot. And the second one will contain a complete working solution for that section. So make sure you download that before you start the course. It will be used throughout the course. 7. Fundamentals introduction: In this section, we are going to cover some of the foundational technical aspects of automation, which will be data types and variables. These don't just apply to you APA, they uphold. So all the automation software and programming in general. If you ask me with these topics, feel free to skip ahead. If you want a highly recommend, you stay for this section. Watch an econ always bookmark the sections to come back to in feature. Because I will constantly be used throughout the entire course. 8. Data types: One of the things we will encounter quite often in UI path is datatypes. So I just want to cover is foundational subject. If you smear with these data types, feel free to skip ahead. But if you want a highly recommend, we go over this now. And you can also bookmark this to come back to later as a reference point for what a string is, when an integer is, what an array is, and so on. So let's jump into what is a data type. It's a way to classify data and tell your computer what type of data you are storing in you up half when using activity, you always need to classify the datatype whenever you're defining a data that goes into it, or storing data in variables in UI path. The five main data types you need to be aware of is string, integer, Boolean, data table, and finally an array. So let's dive into what eight of those are. First one is a string, it's those tags and it must be surrounded by double quotes. So for example, if we want to store the text Hello, we need to surround it in double quotation marks as hello. Then we've got integers, these two numbers. And you're able to run math operations such as adding, subtracting, dividing, and multiplying. Unlike a string, we don't need to surround them with double quotation marks, so we can stall 42 just as a number. Then we have Booleans. These can only be set to true or false. Then we've got a data table. It stores a table data. Think of an Excel table that you've seen before. That's pretty much what a data table is. So in our example, we have got the firstname and lastname of Bob Smith, then Mary Jane. And finally, an array. This hold several values of the same kind. Think of a shopping list as a reference when you're thinking of an array. So if your example, ShoppingList has apple, pear, and banana. So that concludes datatypes in UI path. If you're still not familiar with it, not to worry, we will be covering them in more detail as we use them. But this is just a good reference points as to what the ones we encounter. A new iPod will be, what they do, and how they store data. 9. Variables: Next up, I just want to run over variables that are essentially used to temporarily store data. We'll see running a process that you can access later on in the process. So you are puff, it has memory wall running a process. You see not variables TAP early on in the UI path to go down the bottom. If we want to store data out, we can create variables down here. To create these, we can either create them in the variables tab or use Control K when your app putting some sort of item or activity results. And it will automatically stop creating unbearable for you. So for example, let's just say we create a variable with a name, first name of the type string. I want to slow my first name in there. I could actually store Andrew inside that variable, and then it can be accessed later on. The variable's value can also be changes the process runs so that firstname, let's just say I changed my name to Bob. I could change what's stored in a tube bulb. And variables are also script, which means how visible is the iPod of your process. You can only set it to be accessible to either your whole process. So any activity in your whole process can access that variable or a subsection of your process. So this is a bit confusing, but it's much easier if we look at a diagram here. So let's just say we have this example process. We have a sequence, and inside that sequence we have a login to up and scrape data. You'll notice we have these variables here in the screenshot login or product press. The login variable is only accessible to anything inside that login to app, to scrape data couldn't access its value, set its value or anything like that. Only the login 2ab can deliver, whereas the product price scope is sequence. So that means anything inside the sequence, which typically a process will always have a sequence set encompasses everything, can access its value and set it. So anything inside to login, to App and scrape data can access and set that product price. So we'll explore this more as we develop our boats because we'll be using quiet a lot. However, it's just good to keep this in mind as to what they are, what they do. And you can bookmark was to come back to later if you need a refresher. So let's take a quick break. 10. Order System Intro: In this section, we're going to look at automating and order system where we can add and retrieve orders at a high level. This is what the flow will look like for our auteur system. First of all, we have to watch your application. Then we can navigate to add an order, navigate to retrieve an order or exit in this navigation menu, we'll get to in a moment. From there, you can either add the order details or getting the order details for a particular order. So this is visually what it looks like. We launch our application. We have our options menu where we can add a new order, new and existing order or quit. We need to type in the auction number to go to the next screen. And then on the right at the top we can see the new order. We can add the product code number, required, price, cost center and so on. Or an a view water, we can put in an order number to retrieve the order details. So I'm going to show you a quick overview of the ad in order and retrieve an order bot running that you have setup, uh, by the end of this section. So this is our ordering system bought when we run it, it's just going to sign into an application. Open up, had any order, put in details with specified and added water super-quick. This time, it's going to retrieve an order right before it will run and navigates this time to retrieve an audit screen. However, it will grab some details. This will happen light and quickly. You will barely be able to see the order come up right now. But we'll see these details in the UI path Apple console, just down in the bottom left here. Okay. Does it 40 auteur system? In the next lecture, I'll show you it working, navigating around the application and you can downward the audit system in the next lecture or in this course. Chat soon. 11. Order System Tour: In the download section of this lecture, of course, you will be able to download the training order system. It's just an executable application. So you need to store it somewhere on your computer because will automate it surely. If you double-click on it, it's just going to open up for assigning staff number is BP. Password is just password. And click sign in. And that will take us to the main menu. We can type in one and click on go to add a new order. You can just put in whatever details you won't go submit order. Then it will say please take a note of your order reference, gives you a random number, hit continue. You can use to, to view an existing order. Note that it's just going to return some random details to you. It's not actually storing any orders. The purpose of this application is just for the exercises around doing automation. So I can do 1.2.3, hit retrieved water. That's going to give me some order details. Occasionally it will throw a product not found randomly. Just so you can build up, ought to be able to handle these errors. And if I close down that and type in three, it's just going to quit the application. So as mentioned, you can download it in this lecture or course. And in the next lecture, let's jump into automating your system. 12. Login: So by now, you should have downloaded the training audit system. And we're going to create a bot and UI path to add an order. So first of all, is logging into the audit system and navigating the application. So make sure you have the auteur system open and create a new process in UI path. We're going to call this add order. And I'm just setup this outputs here just to order higher wilted Dan error. Just so got more space on my screen, one on showing you how to develop bots. So we've your process credit. You'll be greeted with a landing screen here. You'll say you can see various shortcuts in UI path that needs an arrays now. But as it developed its good synergy shortcuts in order to be able to develop faster and navigate around the app a lot faster. What we need to do is we need to go on to the project tab at the left side, opener main.cc, AML. And then we've got our box here to start creating any pop, we need to drag an activity onto it. The main two activities will be sequence and flow charts. So you can have a such a flow shop and drag it onto activity. Or you can search for sequence and drag it on. You always need to drag one of these on as your main item for the bought everything, we need to be wrapped in either eye sequence or activity. I'm going to delete everything and we're just going to use sequence. So just remember this. The key difference is a sequence always starts at 1 and finishes at the same point every time. Reservoir, as you can see by the icon here, you always start at 1, but it can have many routes to the finish line and the finish step in a bot won't always be the same every time. Or as a sequence is just linear essentially. And flowchart has many paths. So with that sequence dragged on, we can now set up airports to actually sign in city order system and navigate to the ad on the screen to open an application, UI path search for open application. And this system, you'll say open application, we can track that activity on here. And then you can see now we've got this indicate window on screen. Sorry, this is telling you what path, what application we want to open. So click on that. And then you can drag your mouse around the screen and you can highlight different applications. If you can't see your order system, what you can do is as soon as you click on an item, it is going to use an application. But if it's blocked by somewhat application, you can use F2. It will give you a 3 second delay to medium mass around with applications around. And then once you're able to highlight the order system application, just click on that. That's going to take us back to you wipe off. We can see we've got a screenshot of it here. And that's telling you I popped open an application training order System.out xy the screenshot is for informational purposes. So when you're creating editing urine bots using Arab peoples bought, you can see what the flow should look like in terms of a visual view. And on the right side in the properties we can see under filename, if you click on a three dots, it will show you the full file path to the application to watch it on your computer. So with that set up, we can actually close down a auteur system. Go debug file, hit Run file. And you can see here, it's just launch our order system application such successfully opened it up. And now all we need to do is sign in. So in order to sign in when it interacts with the elements, we need to type in the staff number, BJP, the password, password, and click on the Sign In button. So let's start by typing in the username and password. If you search for type. If you're automating any UI application using open application, most of the activities you'll want is under UI automation. You can see we have this element keyboard. We have type into and top secure text. Let's drag type into. We're going to put it inside that do, which is insight open application. Click indicate element inside window. Click on staff number. And you can see here it's now highlighted the staff number and we want to talk and they paid. So if we type in Bay paid, ensuring it's in quotation marks, this is going to launch the auteur system type in BP. And then let's type in the password. Now, you should use type secure text whenever you're typing into secure input fields such as someone's password. However, for the purposes of this spot and learning how to create bots, we're going to use tap into and we'll cover type secure text later on in a best practices around how you can securely store credentials in UI path. So not just anyone who's editing a bot can see them in plaintexts and has access to them. But for now, let's drag and type into just under that step there. Click on indicate element inside a window. Let's click on password. We're going to type the password in quotation marks. And then we finally need to click the Sign In button serve. We search for click. We can see on the UI automation we have elements, image, SAP text. We want to use elements because that's indicating an actual elements in the application. We just need a single click. So drag that under here. Click indicate element inside window. Click the Sign In button. And now we've successfully set up our bot to actually type in the username and password to sign is V application. So let's close that down. Hit debug file, hit Run file, say touch any username, password, hits, sign-in, and it signs into our ordering system application. So congratulations on setting it up. We're going to get sued navigating in a second, in a next lecture as an activity you could do. Before we move on into that, I just want to quickly go over how you I puff works with application automation. By typing into the staff number password and clicking the submit it knows to, to actually use our orange system application. Because you'll notice these are all nested inside this too. If you click on it, it will highlight it here. Then if you click on the Open application, you can see this surrounds everything inside, typing a stock number possible by clicking the Sign In button. So what that means is anything under this open application that's nested inside here should always be to do with automating a training audit system and now our application at all and UI path or use that to make sure it's actually typing in your username, password, adding orders, retrieving orders in the system, and not any other system accidentally. So you want to make sure whenever you're automating an application, everything is nested under the open application for that particular application. And you can see here, it will automatically do it for you. So make sure you keep your actual bought structure in mind. When you order many applications. And any action such as typing, clicking, should be nested inside the application and automatically create a due in there for you to nested inside. So let's take a quick break before we move on into the next lecture. 13. [ACTIVITY] Navigate to add order: Now it's time to automate the navigation page. We're going to add a new order. So all I need to do is click one, hit go. And then that's going to bring up a new window to add an order. So I recommend you take a quick pause here, then attempt to navigate by typing in one into the text box and clicking on go. If you get stuck, feel free to on polls and I'll show you the solution. And if you complete this, feel free to move on to the next lecture. That's what the remainder will be, is just an activity for you to navigate to add a new order. Ok, now for this solution, to navigate to add a new order screen, we're going to use a combination of the activities we have previously used, which is tapping into and clicking on the Go button. So under actively search for type into. Drag that to the end of the current spot. Click NDK element inside window, click on option number. We need to just type in one in text. Then we need to use click under your automation element mouse click. Add that in, click indicate element inside window. Click on go. Now with that done, let's close down the order system debug file, hit Run file. We can see logs in. It has then opened up our new order screen, ready for robots to add a new order. So I'm going to close that. They're going to save my bot. And let's take a quick break before we move on to the next lecture to add a new water. 14. Adding an order: So now that we can navigate to our Add a New Order screen, we're going to make the bot just add one order and hit Submit. So when we're submitting an order, just remember, when we hit Submit Order, it's going to come up with a new screen saying, please take note of your order reference, hit continue, and then close that down. So we need to add some order details and then click Continue. So we can see we've got four fields to talk into. So let's add a new type into and try that on indicate element inside window would do product code for that. So we'll do ABC. We'll do another type into number required. We can do one in quotation marks. And another way to add an activity in UI path is clicking on this plus button or control shift T. If I click on plus, it's going to bring up the universal, universal search bar. And you can see it has the race and results I've used. I can also search for tap into. And it's going to bring up the exact same things we see ini activities pane on the left. So let's click on tap into double-clicking on that, we can then indicates the unit price as the next atom. We're going to do 100. And finally we'll click Add, use another type into and click indicate element inside window. Click on placenta, where going to build that. So Google. And if we click Add, you'll notice it also says that race and activities you used hip surgery if you filling out a form and using the same sorts of activity, it's super handy. You can just keep on using it from here, or it will also show it on the left side. Now we need to click on the submit button. So we'll use click indicate elements, select some in order. Then to get the Continue button, we actually need to go into the application. Autonomy order, hit Submit Order. Now we can see we have this order confirmation window here. So we have that open. We can now add a interactivity to actually click on that order confirmation. So using click, let's see it continue. And we've created our bot. So let's close down up ordering system, make sure we save that. And let's run it end to end to see it adding an order. So hit debug file, hit Run File. You can see opens up the order system, adds a new order, builds out the details, hit Submit Order, hits continue, and it's done. So how fossils that imagine a person mentally doing that on an older system and might take them a couple of minutes to five minutes. You saw the lightning fast within 30 seconds. And it's not going to make any mistakes in data input whatsoever. So we've successfully automated a repetitive task that could exist in any organization and it all, all you could do yourself personally. Say congratulations. In the next lecture is we're going to look at retrieving an order. So let's take a quick break before then. 15. A step back - reusable code with libaries: So now that we've set up a boat to add a new order, we're going to create a bot that can view an existing order. So to set this up, the bot will need to log into the application, come to this navigation screen and select option two to view an existing water, hit go, put in an order number such as 123, and hit retrieved water and a detailed or load here. So we could simply create a new process, copy the code for login, and navigate what changes to navigate to view an existing order. And that would all work fine. However, the problem is if this app updates and let's just say you've copied the same code for 50 different Watts. You would need to update that login and navigate 50 different times if the application was updated. So we're going to quickly go into a presentation to show you the new approach will take to building out our audit system to make reusable components in the libraries. So the approach we were taking, as mentioned, is for placing an order. We had a bought which would login, navigate to the place order screen, then place an order, and we'll go into create a separate book which would login, navigate to the architrave order screen and get the order details. So as you can tell, if the application updates and the login and navigate screen changes. That means we will have to update each of these bots for small amount, that's OK. But if you had up to 50 books, that would be an absolute nightmare to try and go through, update on wall and maintain it. So let's take a look at the approach to take in UI path. To share these common code between bots. We are going to use a library to house the common tasks. When you create a new UI path project, you'll notice under a new process, There's also a library and that's for reusable components that can then be published together as a library and then you add them as dependencies to your automation processes. So we're going to create a single library that will login to the order application, then navigate the screens. We're going to allow the user to input into their library which great memoir and navigate to that's placed an order, retrieve an order or exit. And then we're going to have two separate processes which all use this same common library. One of them, we place an order, the other one will be getting an order details. So before we move forward to do any order details, let's take the login and navigate and stick it into a library in UI path. Okay, so what back in UI path now. And to create a new library, we're going to go to home under new project select library. We're going to call this order system library. And for description will do reusable code for login and navigates. It creates. And then you can see we have our honest system here. It's pretty much the same as a process. However, you will notice the main.xml file is now I knew activity dot XML. The way it works is you can have multiple of these animals and you could call them from a process to actually run this code. For. Now, let's just use the default new activity. In order to get the login and navigate code, we're going to open up a new UI path. So that way we can copy and paste all the code without needing to close this library down. Then open our power add to order process. So you can see, let's open up our ad order and I separate UI path window. Let's go to the main.xml. And then what we can do, let's just copy this whole application step. So go copy. Then let's paste it in here. And you'll notice the screenshots break when we paste. So I'll show you how to fix those in a moment. But what we want to do is you'll notice all our steps. We type in BP password. We click on the bottom, which is the Login button. You probably want to rename that to something more friendly so you can double-click on a target on their click Login. Then this is typing in number one for the navigation options. So the top navigation option. This step here is clicking that Go button. So we can rename this click Go. And from here on out, you'll notice that we're typing in our actual order we want to add, so we don't need these steps, we just want to be able to login to navigate. So you can use Control key to click on audio steps. And you'll notice they all highlighted at the same time. They also highlight in your outline on the left to indicate there currently selected. And we'll do more selected using the control k to select them, click delete. And now with delayed over i steps. And let's just rename the rest of the steps to be something more friendly. So we'll do taht, username, type, password, clinical login type Navigation option, click go. And we've got our open application training all the system. So now that we've set this up, let's verify it's still working inside a library and it's run in the exact same manner or process is run by going debug file, run file. Can see it open up. Our audit system is logged in and it will navigate to our auction, which is add a new water. So it can verify the same steps work. So now that we've set this up, how can we make it a reusable component? Because depending on the bought, it might want to add in any order, you and existing order or quit. What we can do is we can use something called arguments. And arguments are used to pass data into a library or process when it's running from the top in its first step. Or you can also output a data from a process or library that will be used when this is finished running and another bot. In this case, what do you think we would use if we want to type in and navigation opsin, remember that in input will come into the bot at the start and outputs will be used at the end, and then can be used in a subsequent process, a library. If you guessed, input you alright, so what we need to do is under arguments, we're going to create a new argument called Navigation option. The direction is in, fought it through communists and input. It can also make an, an output, can make it boyfriend input and output or something else to show property, let's just focus on input for now. And you can give it a default value as well. So that way, if nothing is passed to this, it will use this default value instead for this argument Navigation option. So let's just type in one, which is to add a new order. And then let's change our bought two years this argument. So under navigational option arguments, the exact same as variables inside a bot when you're referencing them. And if we start typing, you can see now variables or arguments will come at the top. We've got navigation option here. So let's hit Enter on that. Its default value is one. So let's just debug our file and see if it opens up our solar system and navigates with option one. Can say it successfully navigated with option one. Let's go ahead and change that default value to option to, to view an existing order to verify that it is working as intended. Hit debug file, hit Run file. And we can see here it navigated to the view and older screen. So now we've successfully created this library which can be reused by any bought at all, which is interfacing with the old system to login and navigate to the option specified. So let's take a quick break. And in the next lecture, I'll show you how you can integrate a library with your process. 16. Using our library: Just before I show you how to use this library to sun and sorrows audit system and navigate. I'll quickly show you how to update the images. You'll notice they all have image on available. If you click on the three dots next to any of them, you can change the informative screenshots. So let's click on that. Then you can say, you can click and drag this red box. Let go. And that will actually set the screenshot for UI path. So by default, remember it will set the screenshot for you. But remember when we copied these activities from a process to a library, it no longer has them available. But if you also have an existing prices and you want to change the screen shot, you can also do that if the default screenshot UI pop provides doesn't give you enough information, just remember that using the screenshots and actually setting the name manually of each activity makes your code a lot easier to rate when you open up a process at a later date and for other people. But now let's move on to how we can actually use this activity. We've inside our Atwater process suffer library. In order to use it, we need to actually publish it and not just save it. And you'll see you have a publish button up here. Select publish. You can give your package name. We're going to use honest system library. You can give a diversion as it's 1. And every time you update the library, you need to publish it again and the version number we'll increment. You have published options. You want to make sure this is set to custom. And I've created a photon and the UI path called My Library. As you can see here. And this is going to store all my library that had been published that can be used by other processes. So make sure you create a photo and actually set that to your custom URL so you can go select folder in explorer once you've created it. Ignore the other settings. We don't need them for now. With that done, let's say publish. It will compile and now publish our audit system library. We can see it successfully published. I'm using version 1.0.1. You'll probably have 1 because I've already published a version before. So with that done, let's hit OK. Let's go back to home. Let's open up that add order process and let's use that library. So undermined example. In order to use our library on, under Project tab on the left side, you have these dependencies. And what you can do, you can right-click, go manage. So now we have managed packages open. We need to actually tell you iPod where to find our packages. So to do that, we're going to call this my libraries. On the settings under source, click on the three dots. Go to the UI part folder, select the My library folder we've created, hit select folder, then click the Add button. And now you'll notice under all packages you have a my library's tap it. So if you click on that, you can see all the custom libraries you've created. I've created one earlier called blank library. And you can say the audit system library we created would be Description reusable code for login and navigate. So let's click that. Click, Install, click Save. And now what we can do under the audit system sequence, let's actually deletes all the steps that actually taught in the username and password, lead that delay, that delay dot delete to navigate and delete ago. We still wanted to add an order, so we'll leave the product code as ABC, the amount required as one and so on. And now under activities, we can see we have how order system library here under available. So if we expand that, we have new activity, which is a default activity in our library. That's the one we actually set up to open their navigates through our oldest system. So let's drag that onto our sequence, will rename its login and navigate. With that selected go to Properties. And you'll notice you can also set your navigation option. So remember, 40 order system. We want to add a new order. So we just want to pass in the Navigation option as one, which we'll type in 1D and add a new auto. So let's try debugging this now and see how we go. So you can see a kind of word, but you'll notice it actually also open up a separate window to sign-in and add era order any original window. The reason that that is happening is this login and navigate also has an open application, which will open the application. It's all Login and navigate. Then we have another open application step here. So u i PAF is getting a bit confused because we have to order system applications open in order to not actually open up the training order systems twice under activities such attached. And you'll say we have various options. We want to use this Attached window. So let's just drag this on that login and navigate. Then open up the order system. Click on indicate window on screen. Let's hit F to open up our oldest system. Then make sure we select that. And then what we can do under open application, let's drag in this due to the Attached window than let's delete open application. And what this is doing is this, instead of opening the order system, the attach window will actually find an existing window that's open to training order system and then run the steps here. So we don't open it up to training all the systems. So let says that by hitting debug file and run file now. So we can see here, it successfully adds a new product and it doesn't try and open up our training order system twice. So this is what you use if you already have your application running. And you want the, all the steps inside this to relate to that order system application. You'll notice we have to do is nested inside each other on the screen and inside the outline here. If you right-click on the top one and then go delete United. So actually delayed all the steps. So lets it controls. And what you can do if you just want to delete this one only just right-click, click Remove surrounding sequence. And it will delete one of those dues. So we only have one and not two nested inside each other. So it looks a lot more nicer on the screen. And remember that everything inside is too will relate to that window it's attached to for the training audit system. And this Attached window will fail if we don't already have the oldest system application opened, Remember, it will not open it. So now that we've set up a login and navigate code to be re-usable, We can now retrieve an order in the next lecture. 17. Retrieve an order: So previously we added a new order using an ordering system. Now we're going to look at a viewing and existing order. So this will navigate using option number two. And that will open up the new order page. And to view an order up, we just talked in a random number, hit retrieved water, and the apple just make up some random details for us. These won't be the same even if you put it in the same autumn number. The purpose of this program is just to test automation software on what we're going to do. We're going to create a new process. We're going to name this retrieved water. And inscriptional Do retrieve and off from the older system. Hit create. And then with that credit, we're going to need to go to our project under dependency select, manage because we need to add our audit system library. As you recall, it's a reusable code for their login and navigate. So hit install. It saved. This will then add it to our process. And now we can actually start setting up the bought. So Andra activities drag in sequence. Remember, you'll need to select the main.xml under the project because that's where you've bought runs from. So dragon sequence. Then you'll see on thus order system library we have our new activity, which is login and navigate. And then we're going to use option two, which is to view an existing order. So make sure Navigation option is set to two in the Properties. And then once again, we need to do attach window. Because this login and navigate will already have the auteur system opened up. And what we're going to do is when we attach it, I prefer to attach it to the very first window that the application opens. It's just a bit more stable of your bots. So open it up to the login screen. Here, indicate window on screen. If you can't select it, hit F2, it will delay for three seconds to open our application. And we can click on it. And now we have this Attached window. So we can actually take the steps inside to do to actually grab an order and retrieve the data ALS. So in training order system, we need to first of all do is go into the view and existing order. So let's go to that screen. Type in a random order number such as 123, it retrieved water. Now let's start automating it. So first of all, we need to put in an order number and click on her tray border. So as you've done already, we need to search for type into and the activities. Drag that in the due. Then we just need to indicate our order number. We're just going to type in the text 1-2-3. Then we search for click. We use the click activity to then click on retrieved order. And remember, we're going to update our titles of activities you ot pop from the default names to make a bit more sense. So we'll just do this type in order number. We'll do this clip portray water. And then let's focus on getting the product code and output units, the UI path console. So in order to get that, if you're not sure what an action is for automation for desktop apps, it's almost always going to be under UI automation. And then you can look around to actually take a look at what you might think. We'll get the text for the product code. So under texts we've got find texts exists, gotta mass some screen scraping. But the one we want for this particular one is on the element is going to then be under control. And we can see we have this getText, which will actually get the text from a program. So let's drag that onto here. Let's click indicate elements. Let's select a product code. And what we need to do, we need to store this product codes on map. So that's going to be stored in something called a variable, which is essentially memory for the book. So it's smart. It can remember a peso data to use later on to create a variable. Or you need to do is click on the activity. On the right side. Under properties, you have this app value. So this is where it's going to actually store what that product code is. So use the shortcut key Control K. It will come this set where we need to give it a name. So we'll name a product code. Hit enter. Then we have this value product code here. And you notice down the bottom under variables we have this product code, which is of type string, which will store text and its scope, which we'll get into a bit later, and you can assign it a default value. Now to test this out, we need to actually print out this product code somewhere. What we can do is under activities search for log. And there will be this one under programming debug, and we can use log message. So this prints out test messages or actual errors in our boards. You'll have two options at a local level and message and the log level, you can give it a certain levels. So typically for testing I use infer since it's for informational purposes. However, if you have a board where something is happening and you want to throw a warning, you can mark it as a warning. If something's happening that's an error. You can mark it as an arrow or you can mark it as fatal. And this is essentially a way to Apple messages to debug you bought later on to figure out why something may not be working and infer is typically for testing purposes and anything about that is you bought isn't working, you should investigate it. So use info on the message. We can start typing in product code. You'll notice that comes up to the top of our list. So click on that. And that will hold the product code that's been read from the bot. So with that set up, let's hit debug file and run file. And let's let it open up our application. You'll notice that opens up a new window, puts in 1-2-3, hits retrieved water. Now this one didn't work because sometimes intentionally this program will throw an error saying no record of found. Just to test if you're bought can handle the scenario. If that happens to you, just make sure you close down the order system and re-run your bot. You can see it just got an order and now with our product code, AA dash one away. And to actually check that the boat was able to store it in this product code variable. Or you need to do is click on the Apple tab. And you'll notice, you can see here the debug logs. So it will tell you when the boat starts. So you can see Execution started. It then comes to the step to print out our log message, which is AA dash 108. And then you can see the finished here. And it ran a lightning fast. So that's how we can get the product code from my particular order. We're going to take a quick break in the next lecture. You'll go in to do an activity to get all these details. And then after that, we'll print all these out in a single log message. So let's take a quick break and jump into the next lecture. 18. [ACTIVITY] Get the rest of the details: So now that we have got the product code, this is an activity where I want you to get the rest of the details such as the units ordered, the price, total price, cost center, the date ordered, and the order as a town. And I want to talk about all these details in the one-block message. With each item on a new lines of product code, a one-line units ordered on a second line and so on. And at the M1 actually the solution, I'm also going to show you a consideration around scope, around making you bought a bit nadir when you develop it to visually look up and to understand. So I recommend you pause now and then get the rest of the details and put them in a single log message. When you're ready on poles to take a look at the solution for getting the details. All right, so to get the details, we just simply need to use the getText for the remaining items. So all I'm going to do is under activities, go to get text, drag a new one in. Let's close down the bottom tab to give myself more room. This one is going to get the units ordered. So let's kick or not in value, use control k to set a variable to store that. We'll do this as units ordered. And we're going to name this top one good product, good. And then just get units order. We'll do another getText will do this one to get the price, control k unit price to set the variable on the output and the properties. Then we'll add another getText, indicate elements, and we'll do turtle price troll code to set the variable as turtle press. You can click on the Add button and use it. Get text as the most recent one. Let's click on that to edit. Click indicate elements. Do cost center, troll cables, thoughts in cost center. And the last two items for getText is finally the date ordered on the output control k theta ordered. And the final one for getText indicate element will do the order as BP. And we'll store this variable ordering. And then let's just eliminate H over our activities to say it gets unit price. The next one is get total process. So it's just a bit nicer to look at are bought and understand what's going on and get cost center, get date, order, and finally get to order all. Okay, with this all said and done, let's log into details. So if also bought, let's just worry about the product code and units ordered only. On a new line. So to do that, we'll go to a log message and the message instead of typing it in the activity here. On the right side, under properties, you can also click on the three dots to expand out message. And this will just give you a bit more room to work. So let's in quotation marks, put in product space code colon, quotation marks then plus the product code. And what that's going to do is that's going to put in a string product code and then get the variable, whatever is stored in that variable product code. So remember on the variables storing product code, units ordered, and so on. So that's going to replace that product code with whatever stored in there. Then kids enter and we'll do units ordered in text in quotation mark than plus. And you can see the auto suggest here. If we type in units ordered, we can hit Select the press Enter. Is that as a variable after product code will need to add plus before the new line to join that as a whole string. So let's hit OK and let's print out a product code and units ordered. So all go debug file, Ron file. Okay, so you can see here we've got product code ably 16 units orders 50. Let's go to the output and the output selected. You'll notice that it prints out the product code as AB 16 and units ordered as 50. However, it doesn't put them on a new line. Remember in our message, if we select the log message, click the three dots on a new line in here. So why isn't it adding it as a new line to our API console? Well, what happens in UI path is you need to explicitly state if your app putting a message or text that you want to intentionally add a new line, it's not going to recognize you pressing Enter and typing in more text. So what you need to do is type in environment. At the end of the first one, then that press thoughts, and then there is a new live command. Then plus, what this will do is this is essentially a special command to tell you. I pop to insert a new line between here and the next block of text. So let's hit OK. Let's send our debug file, Ron file. And now we can see we've got a product Kurt AB 24 with units orders 150 in Apple console, it's printed it out as a single log message as an invert. However, the product card and units ordered is on a separate law and it's a lot easier to debug and read the information. And we don't need 12345678 different log message activities for our bought to print out all the details. We can simply do it in one with message. And just, there are other commands you can use to create a new line. One of them is Vb, CRLF. We'll also create a new line. All these constants, dot vb, CRLF will also create a new line. So you can use that in place of environmental new line. So if you're watching other lectures causes, videos, or documentation, they might use a VB CRLF instead. I personally prefer environments that newline because it's more explicit. When you're developing thoughts. You want to make it super obvious to the person who's reading what's exactly happening. Wonder look at VB CRLF from not for me with that, that's a foreign command to me. But if I look at environmental New Line and I don't know what it is, I can probably make sense of what it's actually doing. Just button name, all that. So to me that makes a lot more sense. So all we use environmental newline. So let's now add the rest of the variables which restoring the other details or the order. So remember we created several. You can see them on the variables tab here, such as price, total, project cost center, and so on. So on the message, let's just add them all to our new one. Ok, so I just went ahead and skipped putting it all in here. So you should have something similar where you have all the details with a new environment, new line for each new line. Make sure for unit price, we've got the unit parse variable which is storing that information. Same total cost center, date ordered, and so on. Let's hit OK. Let's close down the orange system. Go debug file, Ron file. And let's test that can successfully prints out all the information for an individual order. Okay, so now I've bought has finished running. You can see we have an order details here and we've logged all the fields out to the. So with this done, let's just tidy up slightly. So what we're going to do is under the structure, you can see this outline tab here. And this will also outline how each activity is nested within the overall bought. What I want to do is I want to take this log message and stick it outside this Attached window. So once we've got our order datas from the attachment at least log message is simply app putting those values. So it has nothing to do with this Attached window. So I prefer to have an upside. So what we can do is we can click and drag to Asaad. We drop it to the loss autumn here we can see in our outline now this log message is outside our Attached window as a separate item. So now with that done, let's hit debug file. Let's hit Run File. And you'll notice we have this error here. And when we try and run it now using our log message upside that Attached window, we'd be era. You can see it relates to our variables and it says it must not be declared. It may be inaccessible due towards protection level. So let's take a look, shall we? So if we go to our variables tab, you can notice when we click on log message, we don't see any variables. But when we click on get ordre, who see all our variables here. So what's happening is it's related to the scope. What this does is it's restricting access to storing anything in these variables and retrieving everything to inside this do. So in our du, if we go up and click on it, you'll notice it highlights it in blue. So that means this parable is only accessible to save data into and retrieve data from from any activity that's inside that do so how can we access it outside that? That's using the scope. That scope is saying that this variable can only be accessed within side is do we click that and select sequence? That means this product code can actually be accessed from anything within this top-level sequence here. So if we click on that, we can see it has product card now. And if we scroll down to two log message, we can say he, it also now has access to a product code variable. So let's click on that. Do, let's change the scope of all our variables to sequence. With that done, let's go debug fall Ron file. You can see are no longer has an era when it runs. It puts in an order. And then under the output we can see it successfully got all the details for that particular order. So now all those variables are associated at the sequence level. And it means anything that's inside that sequence can set and retrieve those values rather than be only accessible with inside that do. So more rural farm is for variable scope. Just leave them as default and only change them when you need to. Whenever you have an activity that can access it, then you can go into your variables and change the scope of that to something that's higher with inside your outlines. For your ball. 19. Order system wrapup: We have just automated very fast process. We went alone a journey of being able to add an order and retrieve an aura. Also, along the way, we looked at how some areas of applications, you'll be repeating the same behavior in several different processes. How we can actually make these activities re-usable using libraries and you are off, is one of the cornerstones of being a great RPI develop up from doing is you should be able to go away and automate any simple application as it is right now. In the next sections, we're going to automate more applications such as websites, and also look into common issues you encounter wall automating these applications and how it can approach these problems and address them. 20. Excel order system intro: We're going to look at combining the audit system with Excel. This is where the true power of automation comes up. When you combine two separate applications that wouldn't otherwise usually talk to each other using automation. So what we're going to do is we're going to make it. So you can add an order from a provided excel list and then also retrieve an order and then save that all was details into an Excel document. So let's take a quick, so let's take a look at the bot running end-to-end, and then we'll jump into building a. So now we're running the boards to add orders from an Excel file. So we can see it logging in and this XML document on screen is where its rating from to add the orders. So it's added our first line item. Now it's getting onto the second one, which is AB, say one to seven and so on. So it's going to loop over each of the droids until it's added all the orders. I'm just going to fast forward it to the completion of the bot. And now the ball is running to retrieve five random orders and save them to an Excel document. So we'll lets running through, I'll show you on screen now the Excel document, which will be the end result of this run, where it's actually saving the orders one bi line to the Excel document. And then the bot will finish off clothes and you'll have an Excel document with all the details you need to know. So once again, really powerful, combining two completely separate applications. Okay, now it's time to combine the oddest system with Excel. 21. Reading from excel: So we have these orders Excel file here. It has a product, could a quantity, a unit price and cost Santa. So what we want to do is we want to read this information into our bought and then add it into our audit system. So first of all, let's focus on getting this information out of Excel. So we've got this Excel document called orders with an Orders worksheet down the bottom. So first of all, what we need to do is we need to create a new process. We're going to call this add order from Excel. And in description would add an order from Excel. Keep a note of the location that the boy is being saved him. So I'm going to copy this. We're going to use it in a moment. So let's hit Create. And we can see our boats created now. So let's open up a Windows Explorer. And what we need to do up here in the address bar, right click go paste. It ends up this should be where you're bought, say two. And you'll see various folders and each of these folders would correspond to a bot. So we named our bought at order from Excel. And you'll notice there's a folder called add order from Excel to open up that folder. And you'll see all the files that relates to that particular bot in here. Now for this lecture or this course, you will be able to download the orders excel sheet that I just showed you at the beginning. So what you need to do is you need to copy and paste that into your ad order from Excel. And I'll show you why in a moment, because output is going to load it from this folder. So with that done, let's close windows explorer and let's set up our bot. So we're going to drag on a sequence into our actual bug. So you can click on Open main workflow also to open up the main.xml file. Tried the sequence on the here. And now let's open up Excel. In your web part, there are two ways to interact with Excel files. The first one is under App integration XL, and you'll see various activities related to working with Excel here, such as reading cells, riding to sell, it's selecting ranges and so on. The second one is on the system file workbook. So this, these activities can also be used to interact with Excel. So what's the difference between the two? And when should I pick workbook and when should I pick Excel? The difference is to use the Excel activities. You need to actually have Excel installed on your computer in order to use them. All the computer that the boy is running on. Whereas we've workbook that can run would add having Excel installed on a system the bot is running on. You'll also notice that workbook has less commands than Excel. Automized hot. I always recommend using excel at all times. Unless you're trying to reduce losses in costs and have systems that don't have Microsoft Office installed. However, this is usually not an issue, so I'd recommend just to use Excel. So in order to open up our Excel sheet, we need to use the activity Excel application scope. So drag that into our sequence. And if you hover over an activity, you'll notice UI path shows us a description of what that activity does. So we can say here with Excel applications, good, it will open up an Excel workbook providing a scope or axial activities. One is activity ends Excel and Excel application or closed. If I specify it doesn't exist, it will create a new Excel file. So in order for this XL application scope to work with that oldest worksheet, we need to put in the path to the file. Usually if you click only does explorer, this will give you the full path to the photo. So C uses Andrew documents and so on. However, UI path has a nifty trick where if you have any of your files with inside the folder, you can just reference it using a name Eileen. So let's right-click on orders. Go rename, copy that whole founding and in quotation marks, pulling orders or XML SX. And that will mean anything inside this XL application scope. That is an external activity. We will take that action on that oldest dot XLS EXE file within sought out bought. You notice if you click on on the Properties tab on the right, it also has some options such as auto saving. This, create a new file, which will create a new Excel file if it doesn't exist. If it's read only, if it's visible, and so on. Now what we want to do is we want to read that data from our orders excel file. In order to be able to, first of all, just log it, add to the UI PAF console and then actually use it in our ordering system. So to do that, we just simply need to drag on the read range activity inside the do. So let's drag that on. Then. It will have two options here. First of all, we need to give it the sheet name. So I'll order system has a sheet name down here called orders, which we want to read this table from. So let's name that orders. It has a second option here, which will indicate the range. If your table starts at one and goes on to say the seven, like this in the very top of that. You don't actually need to set the range because UI path can automatically detect the table for you. But if you had this table, say in a weird spot here, you could set this range as b3, for example, B3 colon two A9, and that would raid the range B3 to A9. But let's undo that and let's leave it as blank. Since you are plot is smart enough to detect a table automatically for us. The next option that will be set by default is add headers. And you want to always have this tit If you have headers inside your Excel document, because that will mean the raid range won't actually read in the head as data. It would just raid in this information here into my data table output and the headers. So an audit to save that to a variable, the data table hit Control K. You will have set there, will talk it. Orders. Hit enter. And now you'll notice you have a variable of a variable top data table. So this is a special variable that essentially stores a table of data, especially when you're working with Excel, is just storing all this data here. Sorry, now, working with that data table, let's see how we can actually log that out to the UI PAF Apple console. So let's search for our blog activity will do log message on the other red range. Log level of info. The message will do is just orders, which is our data table variable. And then let's show our outputs console. And then let's debug a file and run out bots. Make sure you close down Excel first with your orders, will actually, you can see it ran he has successfully. However, alloc message orders just looked at data table. Why did that happen? Why didn't look at the whole table? We have an Excel. Well, what happens is if you have a variable type that isn't string, integer, Boolean and so on. Sometimes you can actually print out the details that's inside that. So it will just print out the variable type instead. If it can't print out the contents of that to the console or logged out. So what we can do instead is inside this data table, we can loop over each row of the data we have and then printed out to the console. So to do that, under activities, we want to expand programming. And there's an option called data table. And this is how you I puff interacts with data table variables. So we're going to use for each row, which will live or each row in that table. So let's try that on the red range and then take the actions in these activities inside here. So in the for each row, we want to do for each row inside orders. Then inside the body or drag the log message and to hear will do log level info again. And in message we're going to do row. In the brackets. We're going to do product code. And then let's add another log message. Now. We'll do the info level again. And inside message will do row. And inside here would be quantity. Now I'm going to run it and show you the output. And then I'll just run over this and explain how it works in a bit more detail just so we can confirm it works. So would that set up, let's hit Run file. And we can see here in the API console, if we open up our Excel sheet, it's printed out ABC one-to-five, quantity a3, then ABC123, seven, the quantity of six, and so on. So it has successfully went over h rho and prints it out the details all logged onto the console. So let's take a look at how that What so what happens is outreach range will actually grab this Excel table and then store it in the data table variable type in here. And then this for HR loop over that data table, which contains everything except for the headers. Because remember, in our radar age we had add headers checked. So that for HR will actually execute the activities inside this on each row in that data table, which corresponds to an excel sheet. Then to access the current row that is being executed on, we can use rho inside this and to reference an actual column, all we need to do is do these brackets. And then the column had a name such as product code. And that will get us the product code for the current column. You can do right quantity. And then if you wanted, you know, price and cost center, you could also do that. So let's add a new one to logout, you know, press, I recommend you quickly pause it here and do what your soap. And when you're ready, unpause and uncommon look at the solution. Okay, so as you probably guessed to add unit price, we simply add a new log message under that. We'll do log level info on the message will derive and we'll do brackets. And you'll notice in the brackets you have this one out of six here. You might be wondering what that is. And that's essentially all the different options you can use for this row. If you press up and down, you can scroll through it. The main two ones, the column name as string and column index as integer. So we can use the column name, which is a header, which is product code quantity. And so what? All we could use a column index which is the position such as column one, column two, column three, and so on or that unit price. So let's try column 34, price instead of actually referring to the header to see if we can break that out. So we'll do row and three inside that instead, hit debug file, hit Run file. Let's check the apple console. And you'll notice when we'll reference in column three, it prints it out folder first row, ABC123, 5-3, then the cost center 101, not the unit price, which is what we were expecting. That's because typically in programming, data, inside a row or a column or an array always starts at position 0. So this product code is an app position one. It's considered at position 0. So this column is 0, quantity is one, unit prices to Cos Santa is three. So if we change this to road through and then debug file and run our file. It will actually print out the unit price instead. So we can see $2.16 and the first row is $2.16. So I prefer to explicitly use the header name instead. It just looks a lot more nasa and a lot easier to make sense of when you're glancing at it. So let's just change that to rho units price. With that, Don just go save. Let's just say that bought by clicking on the Save button up here. And we're just going to take a quick break before we move on to the next lecture. Now that we've been able to read that range from Excel and prints out each row to the console. We're going to use that information to actually add an order to our oldest system application. 22. Adding the order: Okay, now that we've set up to order two raised from an Excel sheet, let's actually make it add to an older system using this data that we've loaded into the data table variable. So you will recall from the previous set of lectures, we already have set up a bot to add an order to our system. So for this one, we're just going to copy that existing code which will attach to the window order system and then fill in some order details. So let's with this Attached window on add order, right-click copy on our existing. But then let's go to an ad to order from Excel bought. And then under this XL application scope, we will then right-click paste. And then that will move on to attach to our window treading water system and add the order. And there's one more step we want to copy from that ad auto, which is that login and navigate library. So we can right-click Copy. And then before we attach the window, we'll right-click paste. And you'll notice that the paste may not work. This is because it's a library. We need to actually add the library as a dependency. So I see on the left here under dependencies, we've got Excel, nail System UI automation. Now add to order from Excel. We go to add order. We have the audit system library. So in AD order from Excel, remember to add a library. Just right-click on dependencies. Go manage. Third to my library's order system library installed. Hit save. And now, if we go back and make sure we copy that login and navigate, right-click and Paste. It will actually add that activity. And that will navigate to option one, which is add a new order. You'll also notice whenever we copy activities from one process to another, the screenshots disappear. As I've mentioned previously, you can click on the three dots, the hamburger menu here, and then change the informative screenshot trace edit. However, if you're copying a lot of activities, this is tedious and time-consuming. So what we can do is we can go back over to out at auto bought. We can copy the screenshots folder. So I selected use Control C. Then go back to our add automatic cell, paste the screenshots folder. Then what we need to do is just close down at order from Excel, but let's save the file. Go into harm. Let's reopen out at order from Excel bought. And once you reopen it, you'll notice all the screenshots load, so we don't need to set it again. So you can copy the whole screen shots folder into your bot. Or if you already have the screenshots folder, simply copy the screen shots from one process to another. And that will simply add it in there for you without having to manually set it. And this is really useful because now we can visually see what this add to order is actually the wing. So we can see it adds all the details. Hit Submit Order, hits continue. And now, before we actually get into the wrestler bought, let says confirm what the behavior is when we add a new order. So let's use option one to add a new order. Put in one for everything goes submit order. It can see you have please take note of your order reference, in which case our existing code will hit continue, then it will close down a new order screen. So what we need to consider is now that we're adding multiple orders for each row in our orders table, we need to click on go. Option number will all ready be set as one at the very end. So inner Attached window training or the system. Let's add another activity at the very end of that, which will do a click on that Go button. Drag that in their indicate elements. Click on Go. And then what we can do is let's rearrange our bot slightly to make it a bit more cleaner when we're looking at it. So if we click on the outline tab, you'll notice we have our Excel application scope, our login and navigate. And Anna, a chat window trading order system. So in our Excel application scope, we actually loop over h rho and our orders table. So what I'm going to do is I'm going to drag that out. And I'll just move them mastered a bottomless got down. And we'll just stick it above login and navigate for now. And we can see on the sequencing, this has now moved out sorts of bit more easier to read and a lot less activities nested inside each other. Let's move the login and navigate above that. Because what we need to do is in his four h row, we want to move this Attached window training auteur system inside that. Just inside the body. We have the log messages. Remember, we logged out the product code and quantity. So let's copy the product code by using the troll a, so highlighted or Control-C to copy it. The product code is the first one out existing activities or type into for the order. So we'll do royal product code than we tend to row quantity after that. For the next one. The one after that is unit price. So dou rho unit price. And a harvest screenshot of the Excel document on screen at the moment. And the final one we need is simply the cost center. Remember, we're using a color name, which is cost center. So the cost center, than we can delete the log messages since we no longer need them. And now let's review our bot. So we can see here we open or orders Excel file. We read the range orders. We'll add it into a data table variable. And you might have already picked up on this problem, but the scope is limited to this do here. However, this for each row will be looping over orders. And if you select that activity, it has no access to that variable because we can't see the orders variable listed under the variables tab. So enraged range orders. Let's change the scope. Once we click on that, drop that Dan select sequence. And now when we click on the for each row of activity, you notice our variable orders is listed under here. So that will be able to access that orders data table loop over each row in it. And then it will populate the order system with a product code, quantity, unit price, cost center, and so on. So let's close down our oldest system and then let's run the bot. So go debug file, Run File. And you'll notice it comes up with an arrow. So how come? We can see the error is related to the row product code, quantity, unit price cost center. Which is a bit strange because in the previous lecture we were able to log them out so that apple console successfully. Well, what happens is when you're typing into anything, it's expecting a data type string. When we're looking at an app console, it will try and print out to that, whatever this is. So this could be a string, this could be an integer or Boolean and so on. What we need to do to explicitly say to UI path that hey, this is a string, it's not a number, it's not a Boolean, it's not a data table. We simply need to convert it to a string. So all we need to do is do a dot to string at the end of a curvy brackets. And then let's add that to the end of each row quantity to convert it to a string. Unit price to convert it to a string, cost center to convert it to a string and so on. And now let's go and debug file Ron file again. It's adding the second order and so on. So now successfully integrated two completely separate applications. And this is where the real power of RPA automation lies in. Where you have two systems which wouldn't otherwise easily talk to each other. And all you can do is simply automate it in UI path. So simply, and if someone's manually doing this, this might take them hours, whereas I can simply do it in minutes. It's a lot more accurate until lot faster. That way the person can actually focus on more value adding activities rather than repeating the same menial task over and over again. So one final hint I have before you move on into the next lecture is, you might notice when you're developing a bought, when you have nested activities can look quite messy. We do have the outline view, but a hint is if we want to focus on, for a trope, if we double-click on it, it will actually zoom in on that activity and everything inside it only. So you notice we can't see anything else. And we can see the breadcrumbs up here indicating this for each row is inside a sequence which is inside our main.xml. If we double-click on his attach window, it will zoom in to that. So it's a lot more cleaner if you want to focus on one particular section of a bot rather than the whole thing at once. And we can easily zoom out by clicking on that main. And that will go to all the activities in Nate bought. So handy trick to know. 23. Getting multiple orders: Okay, so what we're going to do now is we're going to view an existing order. We're going to loop over five orders in this bot. Portray the details here and say them into an Excel document. So let's first of all create our bot to actually live over the orders and walk them at to the UI path API console. And then in the next lecture, we'll look at saving it to Excel. So we're going to create a new process. We're going to call this retrace, oughta. Say to itself. Description will be retrieved orders and save them to excel, create. And then what we're going to do before we start developing a, we just need to go to our dependencies, guard, manage my libraries, and add our audit system library to login and navigate to the retrieve older screen. So let's hit Save. And you'll recall to view an existing order, we need to use option number two. So in our activities will first of all, we'll drag a sequence to start off with. And then on the old system library would drag a new activity, Navigation option two, which is navigated to retrieve water, so-called this open order system, and navigates to retrieve order. Then what we're going to do is we're going to make up five order numbers to loop over them and get those details. So we're just going to use the numbers one to five. So to do that, under activities, search for, for h. Under workflow conditional drag the full age onto the next step. And then for each atom in this VB expression, what we can do is we can create an array with curly brackets. Do one comma two, comma three, comma four, comma five. And what this does is this will actually create an array or list of numbers from one to five. And inside this loop, the item will be number one, number two, number three, number four, number five, and so on. So before we actually set up our body to actually retrieve an order details, you recall in one of the previous lectures, we would actually retrieve a single order and lock it out to the console. So instead of reinventing the wheel, let's actually go into that process and copy out the activities into our tray border, say torque sailboat. So I've got this retrieve order opened up here. And what we're going to do, we're going to select the Attached window, right-click copy. Minimize that than in our 4H body. We're just going to right-click and paste. You can see it puts all the activities in that screen shots don't work. And you'll recall that when we call the inactivity is from one book to another. This great shots don't copy across. So what we can do is we can go into their trade auto bought US control say on the screenshot photo, switching over back to the retrieved water safe to Accel. We just created these control V in our project tab. To create the screenshots photo. Then if we close down both our boats, making sure we save them, we can then open up UI path again. And then in UI path we have opened our tribe older say to accept, bought again. And you'll notice the screenshots. And now here. So let's review what the what's doing is we open and navigate to the retrieve older screen. We type in an order number. We then click Retrieve auto. We then get product, could get units ordered, get press and so on. And then at the end of that loop, will go back to the start of that loop. And it will type in the next order number, but the order number is 123. And what we want is we want to put in level order number 12345. So in typing order number, we simply need to do item dot toString. And I will talk in one or the order numbers. And as we're going down, you'll notice that these activities have a blue exclamation mark. And what this means is that one or more of the activities have validation errors or warnings. If we click on one of them with the exclamation mark, such as get product could. You'll notice this output here. Product could has an exclamation mark. And if you hover over it, the warning is around the product card not being declared, it may be inaccessible. G2, its protection level. And what's actually happening with this is if we click on variables, you'll recall in our trade water, we will storing this in a product code variable. However, when you copy an activity over from one to i naught up, it doesn't copy it a variables by evolve. So recommend noting that down because this will catch your app and you'll be wondering why you bought isn't working if you are copying or activities that rely on saving two variables. So to fix this, what we can do is under the variables tab, we can manually create a variable called product code. So let's copy this. So let's select the copy on the crate variable, credit one called Product Code. Remember, it was of a type string. Scope will set to sequence. And you want to address that exclamation mark wanting goes away. You'll notice I get units ordered, get unit price, get total price, and cost center will all have the same one. So I'm just going to go through and create a new variable for each of these now, bodies sequence four units ordered a click on unit price. It was outputting it to a unit price variable. Copula is m and all that you do the remaining just on your own now. Ok, so you shouldn't have added all the variables. I've got Oman here, its product code, units ordered TO, to press placenta. They ordered and order all of the top string. And we're setting the scope to be the sequence which is the highest level. In this process, just any activity in an accessor. So to test out bought, what we'll do is we'll just use the log activity to actually log out a message to the console. So do log level info and we'll just do the product CO2 now. So the product code surrounded in a string plus the actual variable product could. And having a look at that, what should happen is a sequence or open and navigates view existing order screen. And then for each atom in this array of numbers from one to five will attach to the training auto system, will type in the order number, will hit her tray borda, or grab the details. And we're just going to look at the product code to make drops working. And then in the next lecture we'll save this torque cell. So let's run that to see that in action K. So we can say we've got our first order here. Then you'll notice for the second-order, it's meant to put in the number two, but it's actually added it to the end. So it's put in two of the one, then three, then four. So for each item, It's actually just adding the order number to the end of whatever text is already in that order number textbooks. So that's not right. It should be looping over all putting in one by itself to pray, but so often, so on. So this is clearly a problem with APA, we have to resolve. And lucky in UI pop, this is such a simple fix. All you need to do is for any bots that are typing into a text box, there is an option to clear any existing input in this text box. So what we can do is in his typing order number, there'll be this empty field if you check that. So it's true. What this means is when the bot starts tapping into that field, it will empty any existing text that is already in there. So let's close down our book. Hit debug file, hit Run file. Can see we've got the first order number now. And then it taught in number two and doesn't add it to the end. So it can get second order, the third order, fourth order, and so on. So I recommend for any boats you do, you make sure this is always shaped unless you actually adding text to the end of something that already exists in a text field. It's just a nice safe way to make sure if there is any text for whatever reason in the system you're automating that you clear it out and you'll starting from a blank slate. So now that that's when pre-orders Want to five, if we go to an Apple console, you can say here, it's printed out the five different product codes. So let's take a quick break before we look at seventies into an Excel document. 24. Saving to excel: Okay, so now that we've got five orders retrieving, we're going to save it into an Excel document. In order to do that, we're going to use a data table and UI pop to store this into a data table. And we'll be writing that data table to the Excel document. So first of all, Andra activities search for data table. You'll see this under programming data table, there's various options here. To create a brand new data table. All we need to do is drag and build data table would do before h. And what you can do, you can click on this data table here. And by default it will have column one and column two. The first column being a string with some example data texts in. The second column being an integer with a number in that. So think of this as an Excel table bought in UI path and super-simple to stay these data tables back to excel and read data from Excel into these data tables so that the recommended method and datatype of interacting with Excel. So what we're going to do is we're going to first of all just say the product code units ordered, an order press into excel in, in our next lecture, there'll be an activity to address yourself. For now. On column one, we can click on Edit and we can change the name. We're just going to change this to product code. We just want our data tops to be a string to store texts. Allow now will allow you to store an empty value within that column. You can give it a default value. You can make trots unique, and you can give it a maximal length. For now we'll just leave the default as is. Then four column two, we're going to go edit. We're going to change this to units ordered. We're going to change this to a type string. Maxlength. We'll do 100. It will give us a warning saying all data will be lost. And that's because by default it added an example rows. So if we hit OK. We can see it removes that example data. And then to add an extra column on the left hand side of the top, click add column on a Headers then will be unit price. I'll type string maxlength minus1 will mean this is no maximum length. You can put in as much text as you want. So leave that as default. And then we're going to select the first row, hit the Delete button to delete that example data and then hit OK, and that's created out data table. Now what we need to do is we need to store and order on each row in this data table. And to do that in this foreach, all we need to do is under the log message, under the activity is there's going to be an Add Data row activity. Drag that on. And in the right-hand side we tell it what data type that we want to add two. So going back to well, build data table, we actually need to sonnets to a variable. So using control k will set a variable Orders table. Hit enter. And then that way under our variables, we now have this Orders table here. And when we go back to just after alloc message in our data, in data table, we can type in Orders table. In inner railroad. If we click on the three dots, the way you can write data is using these curly brackets for an object. Then we can put it in our variables. So we can do product codes. If you do a dot product code to coma. And then the next one we want to do is units ordered. You'll notice when you're adding to a data table, it won't actually order complete unless you add a dot to the start of it. So if we do a comma for the third one and when D dot unit price, it will actually throw it out and we can select it. But it won't work if we use a dot. So the dots just a nice way. Only in adding a data row to fill out the order completion to get available name, right? So let's just delete the dots here, okay. And now let's save it to Excel and then review what we've done. So to save it to Excel, or we need to do, is do without Excel application scope. So remember, at the very end here at the bottom, after we've looped over everything. So going to the outline, this activity will occur after the forays, which has added the information to our data table. In Excel application scope, we're just going to do this as z order, details and quotation marks as an Excel document name. And then in the dirt to save that into an Excel document, just look up, right range. This is going to be on that app integration Excel. Try that into outdo. We're just going to write it into shape one by default, starting at the cell A1. And in data table, we're going to do orders table, which is our orders table, data table that we've created. So let's run the bought and then review the activities we have added. So the debug file, Ron file, it's going to login now and it's going to loop over all our orders, saving a product code units ordered, and press to our table, which will be written into Excel. Now that the board has run to verify it actually saved the order details to our Excel document. Let's go check out the Excel document. Remember, if you don't provide a full path in the axial applications but scope, it will actually save the XML document has same folder you bought is in. And a quick way to get to that is if you go to Project, you may not see the actual document here, but you can always right-click on the main dot XML, go Open file location. And then it's jumped straight into the full path to our process. We can open up order details. And we can say the board has successfully red and added five orders to our Excel document. So nevertheless added it. Let's just review the steps of our bought a game. So what happens is in UI path, we set up a new data table. You notice that the headings don't actually get added to the Excel document. These headings up here, I only use by UI path to actually add and read data from a data table. If we actually also want to add the headings 12 cell document in the first row. We can do product, could the units ordered, then press. We don't need quotation marks, so there's wants because it's already set. So a string data type for the data table. And now when we rerun our bought, it will actually add these as a heading to our data table and then add the rows as it's reading the orders. And then the next activity we done is this add data row. And what happens here is in this update a row. In the properties on the input, we added the Orders table, which is a data type that we want to add data to it. And any railroad, we can use a special shorthand syntax with curly brackets. And then using variables, strings and commerce. It will actually add these values to a particular road. So for example, row one. In position one, we have product code. In position two, we have units ordered, and in position three we have unit price. So this will do what four or five orders we get. And finally, in our Excel application scope, we go to an order detail sheet. It's always going to create a new file in our in our case. So it has an existing file. It's going to overwrite the old order details at the nuance. And then all we need to do is use raw range with our orders table variable. For our data table. We tell it to write into Sheet one starting at cell A1. And we'll put our whole table. So as you can see, it's really easy to read and write data into Excel. And now that we've actually added the heading names. So where default data table. Let's just rerun our bought to make sure that works. Ok. I bought finished running. So let's go back to our directory where the Excel document was saved. Let's open up order details. And we can see here it has added the heading name as well. So it makes a lot more sense. So we're going to take a quick break, and in our next lecture, you're going to add the remaining columns as an activity. 25. [ACTIVITY] Add the remaining fields: So now we have our bought retrieving five orders, adding the product code, units ordered and unit price. There's a few more details and it's getting that we haven't added to the table yet, which is the total price, the cost center date ordered, any order. So for this activity, I want you to add those to our data table. Then in the adroit, make them added. So we'll save to our Excel document. So pause it now and come back if you wish to go over the solution. Okay, so to add extra items that a data table, all we do is go to build data table. We click on Add and we need to add a column name for total price K. Then we'll add a naught, a one for the cost center. Then we'll add one for the date ordered. And finally, we will add that the order of once you guys are all added, will also add our headings. So the total price cost center. Thanks, ordered. And I'll just edit that to be the correct spelling. And finally, the order. We have that done, it's as simple as editing our existing data or we go to our array road. And then all we need to do is add a coma o, use a dot at the start so I can start the order suggestions. So the first one was Turtle price. Then the next one will state ordered sorry, cost center before date ordered. So go back at a comma before that and do a cost center. And then finally, we'll do order or get rid of the dots before the variables. They just helped me make sure the autocomplete worked and how good the correct name. Let's see it. Okay, and all we need to do is go debug file, run file. Ok, now of what's finished running on the left side of the project, when you do reopen your project, it will detect the Excel file and listed here say can also open up by right-clicking on the project got open. And then see we now have the turtle price, the cost center, the date ordered, and the Ohrdruf or application. So super simple. 26. Filter out orders not found: You may have noticed when we're running our get Honors sometimes will get a no record found and will contain no details. If you run the bottles, save it took cell and off times, you'll start to see tables like this. For example, I've increased it to get 15 orders here. And we can see sometimes it will get no record FAFSA product code and it will insert the default heading for the remainder of the audience. So how can we resolve this? What we can do and you are puff is use a filter data table to make sure we remove anything that contains no record found or the product code. So to do that, let's go to our bot. And all we need to do is rots near the very end. Once we've added our data ropes after the loop, before we write it to Excel, what we're going to do is go to the activities tab. Under data table will have this filtered data table. We'll stick this in-between, the saving to excel and looping over all the data. And then in the field to data table, there will be this filter wizard here. So let's click on it. We need to give it an input data table. So this will be our orders table. And it said we want to save it to, I'm gonna save it back to the exact same table. So we'll save it to the orders table. And in the Raphael tree mode, we can select her move and we can do column as a product code. You'll need to surround it in a string for the actual column name. And if it's equal to, will do no record found. Its will actually remove all of those from our data table. Sorry, this is very powerful using a combination of filtering based on the values of rows. You can remove them based on any of these operations. And you can also keep or remove columns in a data table. So really handy way to manipulate them. Let's go OK. And then before we run out bought, what I'm going to do is for each item, let's increase it to 15 orders. So it is 67 and so on, so 50. Okay, we've got 15 orders now, and now we're filtering it. So let's run out, ought to see how we go. We can say order number three, we have no record found. So let's see if we get anymore. And then what we'll do, we'll take a look at the Excel file that is saved. A second record found. Okay, I bought has finished running. So let's go to project. Let's open the order details Excel document. And we can see here, we don't have the product codes where no record was found. So the field today with data table successfully filter those out of the table that will save to excel. So really useful activity when working with data tables, recommend bookmarking this one. 27. Excel order system wrapup: Great job. We have just integrated two completely separate applications, excel and our oldest system. This is where the true power of automation lies. You have two applications that wouldn't otherwise communicate with each other and we can integrate them with automation software such as UI off. Remember any section we covered how you can automate Excel with the Excel activities or workbook activities. The workbook you don't need to have installed to automate it. The Excel Eugenia installed, however, it provides a much, much more greater options. We also looked at storing the Excel tables in UI path using data tables and how we can filter those out to just extract the data we need RNA. And an important thing to know is data tables aren't just for Excel. You could use them for any other sort of operation in UI path, we need some sort of table extracts out. 28. Business Lookup Intro: And this section, we are going to look at how we can automate a web browser to look up and Australian business number and get the company from it. We're going to take a look at Google. So what automation is going to do is it's going to search by an avian. On the left side here is going to put in the number for Google. And then it will return the details of the Google business entity and an output that to the console. However, the really cool thing is we're going to automate it in both Internet Explorer and Chrome. And the cool thing is we're gonna make it so that run at the exact same time. So we'll have them running side-by-side. The book will be able to type into and get details of two completely separate automations that are running at the same time. So I'll cover how to set that up and considerations you need to be aware of. If you do go down this route, which can greatly speed up any sort of automation you have. So let's jump into a demo of this automation. Okay, so now we're running the automation, you up off, it's going to run super fast. Just watch. It pops up right now. Grabs DEA task do and my done. And in the API console we can see we've got from current and Internet Explorer at details of the business. And that covers your strain business lookup. So let's jump into developing the process now. 29. IE Automation: Okay, let's create our bot to look up an ABN and Internet Explorer. First of all. So what we're going to do, we're going to create a new process. We're going to call this one AB and lookup description. So they look up a ABN and gets the business details. Then we're going to go to our project, open up main.js. And to use a browser in your laptop, or we need to do is go to activities. And similar to an application, all we need is an open browser. So instead of automating and actual desktop application, where automating an Internet browser. In the open browser, he put in a URL. You want to open all the a b and look up. That is going to be HTTPS colon slash slash a BIA, got business.gov dot edu slash. And that will be a string in quotation marks. And then what you want to do is over in a properties on the right, you want to choose a browser type. So you can Internet Explorer, Firefox, Chrome, or Edge. For this one, we'll use Internet Explorer then to automate it. First of all, good debug file, run file. And that will open up the website in Internet Explorer for us and we can start automating it. So it's exactly the same as automating a desktop application like the oldest system. All we need to do is inside this do stop tapping into text fields and getting a context. So what I'm going to do is if we search for I type into contract that into outdo. Indicate element inside a browser, indicate the search box here. And a text we want to look up is this Australian business number here. And this is the Google business numbers will give us information about Google. So it will be 34 space 11A, space 97 to space nominate in quotation marks. Then we're going to drag a click activity, click to indicate element. We'll click on that search button. And once that's done, we're going to copy that business number for Google. So select a US Control-C, just a number. Going back to Internet Explorer. Paste that in, hit Search. And it will give us various details for this Australian business number, such as the entity Naomi, IBM status, and so on. What we're gonna do is we're just going to get the entity name and logo it out to our console. So we'll just need to use a getText on the UI automation element control to get the content of the entity name. So we'll highlight this whole box here, which will contain Google. Select that. Then in the absolute value, do control kay, to set a variable. And then we're going to call this business name. To get into men under activities, we can use our log message at the very end, log level info. And a message would simply be that business name variable we created with control k. And that will print out Google Inc. to our UI path Apple console. So let's close down Internet Explorer, a pinata out output console. And let's run this. So debug file, run file. And we can see that ran lightning fast. It looked up that Australian business number Vonnegut was for Google and printed out in Google to the console. So super, super quick. So we're going to take a quick break and look at how we can automate this in Chrome. 30. Chrome automation: Now we're going to look at automating the same steps in Chrome, such US crime in UI path in each head on over to the Tools menu. And inhale, you'll see various UI path extensions when automating any other browser other than Internet Explorer, we need to install the appropriate extension for, in this case it's Chrome. So you just need to click on Chrome, and I will prompt you to install a Chrome extension and successfully installed when in Google Chrome is say this UI path logo in your browser. So with that done, we are going to head on over back to our API and Luca and automate crime in the same pot. So let's open that up now. Okay, we can see it opened here. And we can see a main.xml, which we'll all make Internet Explorer. Or you can actually do this main.cc file. You can actually copy it and make multiple with an iPod. So using Control-C, Control-V to create a copy. Let's right-click and rename this to Chrome. Process. Hits. Okay. Double-click on that. And you can see here we now have the Scrum process MO opened up, close the anon name, and we can create a completely separate automation would have been the same process using Chrome. So on that open browser, we can change this to browser type crime from a dropdown. And most of the other selectors we might be able to reuse. So what we can do is just close down crime and incorrect process heat, debug file, Ron file. And let's see how well bought fares with just changing the browser, Chrome. You can see he worked successfully and we've printed out to ink, and it was super quick. So the way a browser automation works is most of the activities. We use the same settings to select the same element across the different types of browser such as Firefox, Internet Explorer, Chrome, and so on. So as for browser recommendation, I recommend you always use Chrome as a default. And if you automating a Legacy app that only works in Internet Explorer, then use that data to my stable browsers. And a lot of newer websites won't actually support Internet Explorer, which is why I recommend using Chrome. And now we can see here we have our current process we can run to automate the boring Chrome and IE main.xml to automate the ball in Internet Explorer. So let's take a quick break and we're going to split this out into two separate processes and take a look at how we can run them both at the exact same time. 31. Both at the same time: We have now set up our process to look up the Google Australian business number in both Chrome and Internet Explorer and their main.XML file. What we are going to do now is we're going to set up the process to run at the same time simultaneously on two separate browsers. And I'll also show you what to watch out for when you do want to run several processes at the same time. So what we're going to do is first of all, in this main.xml, we're going to use Control-C to copy it, control via paste it. Then we're going to rename this one Internet Explorer process. Internet Explorer process here, okay? And then inside our main.xml, we're going to delete everything inside this sequence and set up Chrome and Internet Explorer thrown at the same time. To do that, it's quite simple. Under activities in UI path, there's something which is a parallel activity, and you'll find it under statements and all you need to do is drag this onto activity. And these lead to run many activities at the exact same time. So what we're going to do, we're going to use this to run both the current process and Internet Explorer process M0 at the same time. So two separate process files simultaneously. All we need to do to run knows is under activities. There is one called invoke workflow file. Drag that onto the parallel. Then all we need to do is click on the folder icon. And this will open up your bot. And we're going to select the first one as Internet Explorer. Click that click open. And that's going to run the Internet Explorer Process File. And then we can use Control-C, Control-V to copy that. And in the second one, open again and select the Chrome process, hit open. And now what this is going to do is this one, both Internet Explorer and Chrome activity at the very same time. So by using a parallel activity, we can run as many activities as we want at the same time. So let's give that a wall now and try it out. So can see both curves, Internet Explorer open up. And if we check the console, they'll both print out Google, Inc.. What we can do to check where it's coming from if we go into the Chrome process on the log message, and the message would come from Chrome. Colon inside a string quotation marks plus businessman to join that together. And then in Internet Explorer process, we can do from Internet Explorer and plus to join the business name. And then finally, if we go back to our main dots ammo, and rerun our process, let's say to confirm that it does indeed get Google Foo from both crime and it's an explorer. That finished running and we got output and we see from Chrome, Google Inc. from Internet Explorer or Google Inc. So how process was successfully able to run too at the same time. So this can be used to speed up your process if you have two separate activities that don't depending on each other and current at the same time. However, there is a small problem with our current setup. And this is a really tricky one if you're not aware of how you, I puff automation works in this manner. I'll show you what I mean now, if we click on the Chrome process or Xamarin and click debug file run foul. Let's take a look at how the process runs. The top sit-in, it clicks on the search button and then it will grab Google, Inc.. What the problem was is the way our processes set up at the moment is you actually physically move our mouse button to this text box, type in a Google business number mu that mouse bought in to this search button and click it here. The problem lies, if we're running both, it's an explorer and crime at the same time. Unless just say where Internet Explorer. And on Internet Explorer, I'll mouse is about the click to type an ABN. But then the Chrome activity is running at the same time as the masses moving in. Internet Explorer to type into here, kermes or mouse clicks on the search button, and then it's an exploit start typing ABM. The problem will be if crime steals the mouse, clicks on search, it will try and type into the Chrome window it rather than Internet Explorer window. Thankfully, I bought is super fast, so we don't have a problem with it as is. However, this is what's known as a race condition, where you have two separate pieces of logic running together affecting the same resource. And what happens is every noun and it might fail to run. And you can spend hours and hours debugging this. So how can we resolve this? Thankfully, you wipe off that super-simple. What we have is something known as input method in UI path. And by default, you are powerful user one called default. And it's compatible with a 100% of the application's background execution is not. And what that means is it actually needs to physically use your mouse and keyboard as if someone was sitting on your computer and topping it. Whereby you can only use a setup for automating a single application at a time. You're not supposed to do with two applications like both Chrome and Internet Explorer black we just done. However, we have these other two Capability methods you send with a message is simulate, type, flesh click, and background execution as yes. What this means is it will send a signal to the application you're using to click on a button. But it doesn't need to physically use your mouse, pointer or keyboard to do that. So this means if you're using a background execution capability of methods, you can automate several applications at once with this. Or as if, if you have an application that uses a default method, you shouldn't be automating more than one application at the same time. So what we're going to do, we're going to change to you simulate type Click. You notice speed is a 100%. That means it's twice as quipped with automation, then default and suddenly there's a message, so you also get a nice speed boost. It doesn't have order hotkey support. So if you try Control-C, Control-V, you can't use hotkeys. So if you do need to use hotkeys, you need to use these other two methods. And it will automatically at the afield. And you can see it will work for 99% of web apps and 60% of desktop apps. So I always recommend using simulate type click if that doesn't work, use windows and message. If that doesn't work reliably to devo. What you can do is you can find out onto the properties, the options you have, sand with a message and simulate type. If you don't have any of them checked, it's going to use this default. However, you can't check one or the other, not both at the same time. So the UI path documentation is really good for this. So if you search for input methods, UI path and Google, you'd get to this page. But let's jump back into OWL bought and change it on Google Chrome. So what will do is if you click on this impulse search button, you will see the properties on the left side. We can click on Simulate click as true. That's the first one. If we try and use Windows seven Windows messages at the same time, you'll notice it comes up with an error in blue. And if you hover over it, it says only one of those operations can be set. So let's use Simulate click, which is the fastest. For getting texts. You don't have these options for typing text. You also have these options. So let's click Simulate type. And then what we can do with the Chrome process selected debug file, run file. And that will run just the crime automation only. You can see it instantly typed it in. And if we go to output, it also run slightly faster. Instead of running in just around four milliseconds, it runs in three milliseconds. So super quick, and it's still got out Google, Inc. business day. So with that down, go over to the Internet Explorer process. On the click the button. Click on Simulate. Click as true in your properties. Same with typing the input simulate taught clip that is true. And we can go back over. What we can do is click on the Save button. We can head on over back to our main process. And if we click on debug file rockfall, we will know it's working because our mouse doesn't hover over the Search button for a second. You can see that ran much, much more quicker. And in our Apple console, we both got Google from Chrome and Internet Explorer. So highly recommend by default when you're doing your butts, always check these as true. And use a Simulate click first if that doesn't work using sand window messages. If that one doesn't work on, take them both and use a default method, which is essentially physically moving your mouse and physical using a keyboard to type into the application. 32. Business Lookup Wrapup: Just to quickly recap, what we covered in this section is that we automated the strain business number website to provide it with a business number, and then it will look up that business entity such as Google. We've done this in Internet Explorer up first, and then we look at how we can install extensions in UI pop. Support automation with other browsers such as Chrome, Firefox, and it also supports Citrix and on my desktop or other processes. We then also looked at how we can automate two separate sets of activities and parallel with Internet Explorer and Chrome running at the same time. This is super powerful and something that may not seem significant right now. However, when you're paying for automation licensing, if you can automate different processes at the same time. It reduces your licensing costs because you don't need as many licenses. And second is your processes run a lot. Fossa said the end users will get the result of the process much, much more quick up. So highly, highly recommend keeping this one in mind. 33. Car list intro: In this section, we're going to automate it website again to add a cop. You can find this website at Academy RPI.com forward slash course for slash colleagues. It's a bit similar to the previous section, however, there's different types of inputs. Now. We have dropdowns, we have radio buttons, we have checked boxes, and so on. So this will make it a bit more challenging around navigating the quirks of these with browser automation. And we'll look at how we can address these quarks as well. So let's take a look at how the boat runs. So now bought is writing an article, is going to prompt several questions such as, What is a maker of the car, what is a model, the transmission, the price, and so on. The user can fill out the details and we'll take this corresponding details and input them into the website on behalf of the user. After clicks submit. You can see at the bottom of the list we have our S3 and now, all right, let's jump into automating this website. 34. [ACTIVITY] Adding a car: So for adding a column to a column list, we're first going to look at creating up bought and adding it to the map. So this is going to be an activity where you set up the bot yourself. So all you'll need to do is in UI path create a new process. We're going to call this one, add CO2 to List B, AB, a car to the car, least website. Create. And now that'll box created. We're going to take a pause here for the activity on once you set up the bot to open up this website in a crime and fill in, uh, make with your favorite car. So take a quick pause and it will come around to the solution in a moment. Okay, for the solution, just locking up previous processes, all we need to do is Andre activities drag on a sequence, making sure we had our main.cc and we'll open up first of all. Then inside that sequence. Or we need to do is to open browser. To open up, our web browser, will copy the website URL. Inserting it in quotation marks for a screen. Make sure the browser type is changed to the crime. And then in the activity, or we need to do is to type into drag that inside the do indicate element. We'll click on them, make textbooks. And I'll put in my favorite cough, which at the moment is IRS three. Then will close down our browser and hit run just to make sure that works successfully. Debug file run file. And we can see it opened up a browser and type in our string. So let's take a quick break before we move on to the next lectures. What we'll look at how to actually set a dropdown value. Set a checkbox, talking a price. Click this check box here and click Submit. 35. Selecting an item from a dropdown: Okay, so now that elbow is typing in a make. It's taught to select our model from the dropdown. So got BMW, Ferrari, Mitsubishi, and Adi, and so on. So you might think that might be as simple as dragging in a type into indicating the elements on the drop down. Let's do hourly and run that to test it out. So debug file, run file, let's say it runs. However, as you noticed of what top dinner make our astray. But it taught in Addie into our make and not the model dropdown. The reason for this is we have dropdowns, UI path, eternity user type into it. There is a different activity called select item. So if we search for activities, we just need to drag this down here. If we click on indicating element in side browser, if you click on this drop-down, what should happen on most websites is you'll be able to actually pick an atom from this modal drop-down. However, on this website we get this arrow that control does not support the selected item. And I know this because I built this website and this isn't a standard HTML drop them. Some developers will use frameworks which don't actually work nicely with UI path. Let me show you an example of a working one and then we'll come back and see how we can work around is with websites that don't use a standard drop down. So what I've got here is an example page and you just need to watch. You don't need to create the bot yourself unless you want to follow along with a standard HTML drop-down with various cause. And this is Academy dot RPI.com slash examples slash selector. And I have a pot set up here to open up that site in Chrome. And then what we're going to do is inside that do activity, drag and select item. Click on indicate element. Select that dropdown here. Doesn't look like a drop there on, but if we click on it, we can see it actually is. And where going to type in SAP to select that one. So to select that, we just type in item we want to select in a string for the text. And now if we debug file, Ron file, open up that website and you'll notice rent super quickly, but it actually selected cell from the dropdown. So that works successfully for a standard HTML selector. However, this example website out developed here. It doesn't use the standard HTML selector and not a website's going to say, how can we work around this? Let's go back to our bot to add a Call. And all we need to do is we'll delete that, select autumn. And what we're going to do, we're going to use a click would right-click on indicate element inside browser. Use F2 to give us a quick delay to open up that browser. It's not already open. We'll click on that dropdown arrow. And then what we're gonna do is in the website, drop that down. Going back to you, I puff, drag on another click. Indicate element inside the browser and just select the model you want. I'm going to choose Audi. And now what happens is if we run output debug file run file can see it types in r3 and it will select and click out in. So that's all great, that works now will pose a challenge later on. If we have a ball which will need to select items based on input from an Excel or a user topping in which one I want to select. However, let's tackle this a bit later on around how we can solve that issue. But for now, you can manually make the bot select the model you want. So, so I've got R3 and no model as Adi. And let's take a quick break before we move on to the other items. 36. Fill out the remainder of the fields: Now that we have now make a model adding, let's do the remaining of the inputs, which is the transmission of the car, the price, accepting the terms and conditions, and finally hitting submit. So they're super simple. All we need to do is for any other checkboxes, we just need to click. So we'll drag on click, indicate element entire browser for their transmission or do the automatic trip box for the price, would simply do type into indicate the price textbox where going to type in 60 thousand. And then finally for the accept terms and conditions or due click indicate element, use that checkbox. And then finally, the same force omit. Drag that on indicate element. We'll click on submit. And then let's test out our bot. So go debug file, run file. There we go outwards, finished running. We can see we successfully added a new car to the list. And if you click on Submit, you can submit it over and over again if you like, or add in a different cause. Leto's do submit and I'll just keep adding cars to that list. So let's take a quick break and look at how we can allow the user to specify the input for the bot to add a carted off site. 37. Prompting the user for input: Okay, now we have created our input dialogues to get the make model transmission and a price of a car. Let's actually use it in our process. First of all, we're going to verify on the variables tab, if we click on an input dialogue makes shorter scope is a sequence. So that way everything inside our process can access those variables. Then inside are open browser. You'll have your activities were at Tuffs, ours for a selects, Adi and so on. What we're going to do is we're going to actually, instead of manually putting in that texts are strains all, we're going to use our variables. So first of all is our comic. And in here, if we delete ours free, we can stop and calm make mix. So we've got the car model on goods to cover that in the next lecture because that's a bit more involved. And I'll dive into that in more detail soon. Then we've got the transmission and you see we've got automatic selected by clicking on it. So if they select menu folder transmission, how can we select that in UI path? So achieved this, since it's already a option just with two selections. What I recommend you use for websites with radio options that are visible on screen is the if statement. So under activities search for if. We can then try that from understatements just below the click, the Avy model. And in this condition, we can check car transmission. And then we'll do equals automatic string. And what this will do is if the car transmission variable has automatic in it, it will do the activities inside this block here for the dead. Or if it's equal to anything other than automatic, it will do the activities inside this else. So we can then track out click on the automatic inside the then. Then we can add another activity called click. So dry that from activities, drop that into the else. Then click on the Indicate element inside browser on our academy RPA at exercise, click on the menu selection. And then what that will do, that will click on menu if the variable when car transmission isn't the automatic. And recall for that input, we actually restricted it to the options, Automatic and Manual so the user wouldn't even be able to select anything else. And then finally, we can do the car price. So instead of 60 thousand price will assume the terms and conditions are accepted and I want to submit it straight away. So with that setup, let's test it out by going debug file, run file. What to make of the car would do? Bmw, M3 modal, BMW transmission menu. The price would be 10 thousand and hit OK. Can say transmission selected as manual process 10 thousand. And then it adds it to our list here on the website. So let's run the board again, hit Run file, but this time we'll select Automatic to make soy that's working properly. So we're going to do BMW M3 again. But this time we'll make it an automatic transmission has automatic price 10 thousand. Here i k. And we can see it successfully selected automatic transition and then added it to our list of cards. So that will super-simple to actually create a bot that we'll ask for input from the user and then type it in to our website. So we're going to take a quick break before the next lecture, where we're going to look at how we can actually use a drop-down to select the car model. 38. Dynamic dropdown: So now we have a process dynamically tapping into make, selecting the transmission, putting in the price, accepting the terms and conditions, and finally, submitting a color. Photo data has an ESA puts in. However, it doesn't actually select a model from the dropdown. So let's take a look at how we can take the user's input and then select the option. You will read along. You will recall that this isn't a standard drop-down. And we actually have to click on the down arrow in the airport and then select one of the atoms. Remember we had the click and select it. So at a glance is nothing obvious as to how we can select another item. You might think we can use another if statement and adding all the dropdown items. However, what if this was 20 items long? You'll need to add 20 items. What is the drop-down was dynamically update your body if you car manufacturers were coming out every year. You don't want that maintenance overhead on your boat of a really complicated if statements is going to be an absolute nightmare to maintain. So let's see how we can dynamically select this. What you want to do is when you go to your clicked, if you want to go to Target. And then you'll see the, select the option. If you click on the three dots here. You might say to select off something different and so on. So what we want to do in our select out, we want to make it. So we will have that Komodo in, love, that baby BMW, Audi and so on. So what you need to do is just cancel out of that in your click Addie. Let's go back to our website. Click on that dropdown. Then Alt Tab, go back into our UI studio to indicate onscreen. And you'll notice if we hover over the items such as BMW, there'll be a big box, but if we hover the techs, there's a slightly smaller box. So let's select a small box and see what we get. With that selected. Let's click on the select the three dots. And you'll notice we now have this wi name here. So that's selecting BMW. So if we run out bought now, good debug file, run file. We'll just put in some random details just to say it actually select BMW, can see it selects it and hit submit. And then if we go back into our click on a BMW, go back until I select up with the three dots on the right of it. This double I name. What happens if we try and type in another model such as adding? Let's do that here. Ok, debug, follow Ron file and see what happens. So we can say about running here. It's clicked on the drop down, however, it hasn't selected ALI. So what we'll do is we'll just close down the browser, will go back to UI path, will go Stop. And what you can do is jump back into the Select All. And what we're going to do is you notice this has this parent I, they ticked here, this double I name and URL. So these are essentially the straighter dress or coordinates for clicking on Addie, BMW and so on. So if you bought isn't successfully clicking on her autumn, what we can do, we can usually de-select somebody's attributes such as a parent ID. Hit OK. It debug file, run file. And let's see if we can actually select the Add a drop down. Now I can say here it successfully selected Adi and filled out the form. So just by simply manipulating the select up, making sure when we indicate the element on screen, we actually get the car model somewhere in the attributes it, we can dynamically change this to actually select the atom. Remember, we had to remove the parent ID because it wasn't working with that. So now we know we don't need that. We can simply select it in the selected text here. The late dot. Hit validate, still working. Then what we can do to actually input the car model. You'll recall we actually store the model, uses selects in his calm modal variable here. So instead of selecting Addie or BMW with the text ID, we can double-click on that Addie to highlight the text. Right-click, go choose variable. Then click on Model, double-click on it. And you'll notice it puts it in his curvy brackets, also known as mustache brackets. And we have Komodo now. So what it's going to do is when it clicks on the dropdown item, it's going to substitute this comet or texted with whatever we have selected. So we have added selected, it will select Audi. If we have Ferrari selected, it will select Ferrari and so on. We don't need that parent our day, we got rid of that before. So let's make sure that's gone. Let's select debug file, hit Run file, and let's make a new Ferrari. So they left Ferrari. The modal will be Ferrari to automatic. And all put in $1 million for a prize. And now if we hit OK. We can see we successfully select the car model from the dropdown. So really recommend bookmarking or keeping this lecture on file. Because when you're automating not just in websites, in desktop applications, sometimes you will encounter challenging drop downs like this where it isn't obvious, pi can select him item while typing something in a dynamic way. And if you can't, what you want to do is jump into the input, select up, make sure you can select your items. Are you have the texts such as the column modal in there with BMW. And then with that done, you can start actually editing it and manually changing the code here yourself. I'd say you can select out of options. And once he got the word that, you can actually insert a variable in our test account model to use the car model that you use up imported into our bought when it was first run. So let's take a quick break before we move on into the wrap up. 39. Car list wrapup: Nice work with automated another website. Just to recap, in this section, we automated adding a car to welfare, which had text inputs, dropped their radio buttons, checkboxes, and so on. We counted some of the challenges, especially with drop-downs. No websites use the standard one that you have, has a select drop them value won't work with it. So we looked at how we can click on that drop down and then click on one of the items in that dropdown to actually walk around and still be able to automate that process. And these are the common challenges you run into when you're automating pieces of software. 90% of what fine. However, there'll be a few key elements like that dropdown, which are fiddly to get working. There is always a solution to it. And if you ever get stuck, either let me know on his course or remember to check out the URL path community forums, super, super helpful people there who have likely encountered the same challenges that you are now and have already sold them and post it up a solution with the details around how to address that particular challenge. 40. PDF Invoice scraping intor: In this section, we're going to look at a process which can extract data from pdf invoices. So we have these PDF invoices here. We're going to extract the invoice number, the total cost of the invoice, and any other details we wish to get. They're going to be using Fox that reader to automate this in three key call outs for this section are, is number one, you have to be really careful of licensing and automation. We're not using a w because they actually restrict how you can use Acrobat Reader, especially when it's being used by an automated program. And if you don't get the proper license, you can get find it massively just for that. So this is why we're using Fox at radar. It's free and doesn't have the same restrictions as Adobe. And a second call out to look out for in a section is that when we're automating this, we're going to run into some challenges, extracting the turtle jury hey, where it will work that for one of the invoices. But on the other ones we have it won't work. We'll look at how we can address that. But this is just a common problem you do encounter when automating some application. So it's just good to know how to solve it. So that's using something called anchor tags. We're jumping into it now, but keep that in mind. So let's take a look at a demo of this running. So the process is right now when we hit Run file, it's going to loop over three invoices in folks at radar. You'll notice it also adjusts to zoom size up the top. This is so the invoice fits on the whole screen. So the bot can pick up all the details that's needed, which will show any Apple console. Just now we can see total price, company name, and so on. Alright, let's take a look at our invoice scrape up process. 41. Installing Fox It Reader: Okay, so now we're going to install foxes PDF radar. You can download it at Fox IT software.com. And so my on the side, you should say a downlink afraid. So we're going to select that. And then that will take us through it. The download center, you'll see various free trial downloads. But if you scroll down, we should see some point the folks at Reader, and it has a free download. So this is a free version which it doesn't include all the features of the other ones. But for reading a PDF with automation, that's all we need right now. So let's go to Free Download, select winners and English Godfrey downward. And we can see here it started downloading, sorry, let's just let it downward and then we'll install it. Okay, so we can say here we have Foxx it radar downloaded. So I would just need to double-click on that and open that up. We'll just use the default installation had continued. Well, let us install. They didn't have the nicest color scheme. It's definitely quite noticeable, The bright orange. However, it is a real good products that, as I mentioned earlier, doesn't have the same restrictions as a derby of covering a bit more detail later. Okay, we can say it's downloaded so we can then watch it immediately. That will open up Fox at radar. We're not going to register. And here we go. So now we've got it installed. We'll take a quick break and in the next lecture, we'll look at how we can actually automate reading an invoice. 42. Reading an invoice: So now that we have installed folks it, let's set up our process to extract some details from an invoice. So I'm going to create a new process and invoice extraction. Going into name and extract details from an invoice. Hit Create. And now with this setup attached to the lecture details all this course, there will be an academy RPA in Westphalia fall. And we're going to use that with Fox at radar for this process. So going back to you, I pop, we're going to go to a main.xml in our project. We'll do open application. Drag that on into our main. And then inside the do steps, for now, we're just going to extract the turtle Jew. So to do that with a PDF as the same as you would with any other program. We're going to use the getText activity on inside, I'll do. And then before we do that in open application, what we need to do is go to indicate window on screen. Make sure you highlight the full foxy radar application. Selected that. And that way any of the activities with inside this activity or relate to the folks that read application. Then in the getText we can click on indicate element inside window. And you'll notice if you move around to the text, you'll be able to select the options. And as I mentioned earlier, if you're using a derby out of the box, it doesn't support it. And you need to change a few settings. But folks, that radar is a lot easier. So just select the total Jew. And that will get the text for the Turtle. And with that get texts, we're just going to rename this to get turtle press. And we'll store the output in a variable called total price. So selecting that control k to Turtle press, hit Enter. And then we'll do a logger activity log message. And we'll just use infer and logout the total price to output console. So with that done, let's close down folks at radar. Let's hit Debug fall. Ron file. It opens up folks at radar. However, you'll notice it just seed set and it's going to eventually throw an arrow. We can see the error here. And you've probably picked up on already, but the error is occurring because we open the application. However, we don't open up our academy RPI inputs. So in our previous processes and bots, AVA, the activity would actually support specifying a filename. Or we will just manually navigate in the program. However, this is a bit more complicated. So what we're going to do is take a quick break and in the next lecture, I'll show you one approach to open a file. We'll do a bit more of the process and then I'll show you an even better approach after that. So let's take a quick break. 43. Opening the file: Okay, let's take a look at how it can open up that file in OCS radar in order to get the total price sums gonna open up Fox at radar now. And in order to open a file, universe isn't racing files. But if you're running a process or bought on a computer, there's no guarantee that it's always good to be listed in here. So safer for us to go to File. Open. Select computer will go browse and then manually navigate to the file. In our case, it's here, we can click on it. You'll notice that feels at the filename, click Open, and then it will open it up in folks radar. Now before we automate it, I just want to show you a quick trick in windows. And this is good to know, not just for folks that radar, but any process you building at all. So I really recommend you bookmark this pot or note down somewhere for future reference. If you go to File Open Computer browse, you'll notice we've got this invoice scraper here in the open window. But what you can do is in a separate windows explorer window, you can see we've had this academy Appiah invoice, the selected good copy path. And now what you can do, no matter what folder this opens up into, let's just say where in a Automation anywhere photo in the filename. If we paste that and we've got the full path, delete the quotation marks. So mine is in F triad, C mu UI path, and so on. Hit open. It will actually open that file. So it's a lot more safer to put in the full path, because when you go to File Open and Browse, there's no guarantee that it's going to open up the folder that your PDF is in. So you better off giving it a full pop to whatever you have stored on your computer. And if you haven't downloaded this invoice yet, you can download it in this lecture. So now let's automate UI path to actually open up a file. So what we'll do is we'll just close down. Folks at radar will open it up again from scratch. And then we're going to use various steps that you've already used to open it up. So just jumping into activities. What we want to do is click, drag that on. That sort of do. We're going to click that file button. Then influx rate of click on file back to you. I puff. Drag on a not a click on that file. And then we're going to click on the computer button, jump back to the folks at reader click on computer. And then we need to you up off the click on browse. So jump back to UI path, dragging, click, click indicate, click Browse. Then we'll click browse and we need to tap into this box here what the file name is. So we'll do type into indicate element on side window, select filename. And then wherever you've downloaded that invoice to your computer, just navigate to it in Windows Explorer. And all you need to do to get the full path, just highlight it up the top here, select Copy path. Then we can paste that into the top into boxes. And now what you can do, you can either hit open or you can actually send an enter key. Which is a shortcut in windows to open a file. So I recommend using shortcuts when you can't windows because there are a lot more quicker and more stable. So to send that educational cut, all we need to do is we need to search for what's called a hotkey activity sent hockey. And this is way consent whole case such as holding down the control key, doing control, delete, if not Task Manager. And so we just need to drop down, select, Enter and make sure you indicate element inside window. Click on a phone box and that will send an enter hockey through that box. So with that set up, let's close down. Folks at radar. Let's quickly review apart. So we open up the file tab, go to compute R, select Browse, putting out invoice file editor, open it, get the turtle price and block it out to the console. So let's go debug file Ron Falta, test that out. Okay, and now that we've run it, you'll notice you'll run into this runtime error here around opening the application folks at reader and how cannot find a UI element corresponding to deselect them. So what do you do when you run into this era? Well, first of all, what you want to do is copy this to the clipboard or take a screenshot of it with the Windows Snipping tool, just so you can still have it up while you're investigating the Arab notebook. So we can see we've got it here. And usually the error is self-explanatory as to where it's going wrong. This one we can see it's around a select Open. It doesn't actually tell us which step is happening on. So usually if that happens, start from top to bottom. If it doesn't turn into a specific step, usually it's one of the ones near the top for the activities. So let's click on Open application. Then what you can do in the input select to select o. And let's take a look at it. It's got the AP folks radar, a class folks that radar and a toggle Academy RPI invoice one. So I can tell you off the top of my head here, the error is to do with the title. And this is just from experience with building various spots or run into these errors. This is something you develop throughout building processes. But what's essentially happening is folks that reader is trying to open up and have academy RPI invoice in total. But let's just open up Fox at radar. That opening up a file. And what happens is the title. Pretty much always refer to this title up the top heat in any application or so our title. And when you open it up, move up, opening a file directly iStockphoto radar. Whereas here it's trying to find a title with Academy RPI invoice one. If we open up that file, that title changes. So how can we fix it? Luckily mentioned before, selectors are essentially a street address for determining which application to automate sand clicks and so on. For the title, we can actually delete Academy, aka invoice surrounded with this stop, which is essentially a wild card, which will match any texts before or after this. So let's go. Okay. Let's close down folks at radar. Let see debug file, Ron file. You'll notice that it's now has no error. Opens up our academy RPI invoice one. And if we jump into the apple console, it's got the total price, which is $0.$24 thousand at that. So if you ever run into errors was selectors, usually it's to do with the ANOVA, too restrictive. And in our case, it was trying to open it up. Having Academy RPI in wastewater in a title. We just simply change that to add a wildcard to the beginning and end. And that means it will match any characters before or after folks at rate r. So this is trying to find any application with Fox at reader in a total. We could also unselect the title and it will just try and find the executable itself. But I recommend typically trying to roll back the selectors from being more restricted to less restrictive until you find a good balance. Because if you want it back too much, you bought might actually try and start automating unexpected applications and exhibiting strange behavior. So let's take a quick break before jumping in the next lecture. 44. [ACTIVITY] Scraping other details: Okay, so now our process is extracting the total price from our Academy arpa invoice. What I want you to do as an activity. I want you to extract some additional fields of your choice. I'm going to extract the title or the company which is Academy RPA, the website here, and invoice number, just like troll for one of the fields, make sure you extract the invoice number here, because we're going to use that in the next lecture. So go to take a quick pause here and then do it yourself. Grabbed some additional details and then we'll resume. Okay. So to get the additional details such as the total Academy RPA, the website Academy RPI, invoice number. All we need to do is simply use a getText like we did for the total price and store it in variables. So I'm going to drag, they get text. I'll go indicate element. We can select the total here in the output variable, could use Control K or do company name. Hit Enter. Will dry day and under getText will indicate element. We'll do the website here. Click on that and we'll do control k will do website. Hit Enter to create a variable for that. And we'll do one more final getText. Indicate element inside window. Select the invoice number in a variable, control k invoice number. Hit Enter to create that. And then I'll just rename the activities here to get the company name, gets website. And I'll jump back out to the parents activity. And finally it will be get the invoice number. And then what we'll do in the login form, I'm just going to modify the message in the message expression editor and I'll put in order details. So what will be the total price? Remember, we need to do a plus to join that string total price and what's actually stored in a variable. And remember, you can use environments, dots, New Line to actually print the next line out to a new line in output console. And then we're going to do the company name. And finally do website and invoice number. Okay, I've setup my expression here to log out all the details. Let's hit OK. And then we can actually run our bought making sure we close down any existence, existing instances of Fox at Rayleigh, debug file, hit Run file. What can say it's finished running. And in our output control, the total price of the company name, the website in the invoice number. So we're going to take a quick break and see how we can actually extract just the number from the invoice number in the next lecture. 45. The invoice number: So now within how prices we have the bought extracting the invoice number. What we're going to do in this lecture is we're just going to extract the number 100 only and get rid of the invoice and a hash. So there's a few different Western approaches to get out that number. I'm going to show you them all and you can decide what is the best for the right situation. And I'll explain the pros and cons of h, but let's jump into it. So what we're going to do is you'll recall that this invoice number is stored within the variable invoice number. So if we click on the login message, conserved got the invoice number, we're going to create three more variables which will store it with that, that invoice text and hashing than the first one, we'll call invoice replace string, the scope will leave to do. Then we'll do another one called invoice substring. And finally one called invoice rejects. Hit enter. And what we're going to do is under activities, we're going to use an activity called assigned, which if you drag on what it will do, it will take whatever's on the left-hand side and assign it to the variable on the right-hand side. So first one we're going to look at which is the simplest is replaced. What we can do in the two, we can do invoice replace. And on the right, we're going to click on the value in the properties at the right-hand side to build up a baby expression to actually store the invoice number. So what we can do is the invoice number currently, once a process grapes, but from the PDF is stored in invoice number. So we're going to take that invoice number. Then after that we can do a dot. And you'll see various functions here which can actually manipulate the text net parable. We're just going to use one called replace. And if you do brackets, what you can do is you replace some sort of text in that with any value. So we're going to replace invoice number. Remember, in waste is in capitals hash. Then we'll do a comma and we're going to replace it with an empty string. So if you just do two quotation marks, it will replace it with an empty string. So nothing at all. So hit, okay, and with that done, we would strike a logo. I log message. Do log level info, and we'll logout that invoice replace. So where Apple console and let's debug file, run file. And now that it's run, if we jump into our apple console, we can notice it got the number 100 island. So that replace, what it done is it actually took that invoice number in the text, replaced it with an empty string. Let's take a look at the two other ways. So we're going to use assign again. And this time we'll assign it to invoice substring. Entering a baby expression, we'll click on that properties just because it's a bit more nicer in its expression, editor, gives a bit more room to say what's happening. We're going to track it and invoice number. This time we're going to do dot substring brackets. And you'll see it has a start index as integral. What this will do is it will take whatever's in the invoice number and grab the starting index. So would deny, which is the starting position and take everything from the ninth character to the right-hand side of that screen. So the first position is 0, then 123 and so on. So if we hit OK, we're going to store that in the invoice substring. Once again, we'll add a log message or copy the existing one. And this time we'll just log at the invoice substring and then we can run that again to verify it's actually working. So let's debug file, run file. And it's finished running in the Apple console, you can see we also go to a 100. So this operates slightly differently. You would have noticed in the previous one, we actually replace the text invoice hash with an empty string. Or as in this one, we actually grab everything in that invoice number, starting at position nine to the end of the string. And the final one is something called a regular expression. We can search in activities for string. You see, even though I just got this replace, we'll try that on that. This is a bit more advanced, so I'm just going to touch on it now. It's just good to be aware that regular expressions do exist. And they are super useful. They are a bit more advanced than a previous activities. So I would really recommend using them if the sub-string or a place isn't working for your particular use case. So what we can do is I'll show you how to use it and I'll jump into a bit more as to how regular expressions work. So in the input where the input, the invoice number in a pattern, just like replace, we're going to do invoice number with a hash for the invoice number are going to live that default rejects option replacement will do an empty string and results, we're going to store that in invoice rejects. With that done, let's again logout the message for the invoice and rejects variable that we created. Then let's debug file Ron file. With that Ron inner Apple Console, you'll notice the third logged message was an invoice graduates, which is also a 100. So there are three different approaches that we can actually use to actually take in some text from a PDF or a Word document and email, so on and replace something that we don't actually need, just so we can extract the actual invoice number itself out rather than have the invoice hash. So with a regular expression, if you search for regular expressions online, you get some websites which you can actually use them online, and it will explain to you how it actually works. So for example, let's just say in here I have a test string or price 100. I also have a price of 10 thousand. If we just want it to extract the price only. And let's just say we have unit price also. And price unit. We'll switch it up a bit. So you'll notice all these strings are slightly different and they don't follow a particular pattern. You could use replace or a bunch of different activities if you want to extract out the price with the subcellular replace. However, that would be TDS. This is where regular expressions would come in super useful. So this has a quick reference here. I'm just going to show you how it works in your own time. You can look into it more. And I'll also look at making a more in-depth lecture or tutorial on this in the future. But essentially we have this pattern here. And then in this regular expression, if I want to get out the price or conduct backslash d, which will actually match a digit, but this only matches a single digit here. So if I want to actually match a whole number, if I use a plus line, you can see here on the exclamation side, it tells us it will match a digit between one and unlimited times. So we have some matching or a 100 here, it's much in 10 thousand here, and so on. So you can see it's super powerful if you know how to use it. So it's just knowing that that option actually exists. If you are doing string manipulation UI path, and your string isn't something that's super simple. 46. A more robust way to open files: So now that we have a process reading the invoice itself, what if I told you there was an easier and quicker way to open up the PDF file rather than automating at for UI automation. Water is most applications you use. When you're using a pen application. You'll have the file name, which is a pocket of the application with the open, you'll have something called argument's. Most applications will allow you to pass arguments to actually open up a given a filename or tweak some other settings when the application starts up. So let's explore the arguments of foxes and how it can be used to open up a file to make it run faster and be more stable in case the UI changes around opening a file. What we're going to do, we're going to go to the expression editor and we need to remember this path to folks radar. We're going to select everything before they told AXA and use Control-C to copy it out. And then what you're going to do is you're going to use a Windows. I can type in cmd. And there'll be a Command Prompt, select that. And this will open up a command prompt. So this is useful for figuring out what arguments and application can take in to save economic proper filename. What we're going to do, we're going to use CAD and then paste that Puffin and see the majors change directory to this folder here. So essentially like you're navigating in Windows Explorer, hit enter. And now what we can do, we can talk in DIR, he hit enter. And this will list all the files in that folder. There's going to be a lot here, but the main one we need to know is the fox at reader dot AXA. Because in your iPod that was a full popped open up Fox that radar. So if we actually typed in so here, now that we're in the folks that rate of photon, FOX, It's radar to AXA hit enter. That will actually open up folks at radar. Now what we can do to figure out what arguments we can actually give you a path and opening it uses folks at rated or AXA four slash helped. And it will list various arguments here, which can actually be used in your iPod. And you can see here, there's one called pdf path. And this will open a PDF document based on a pop, we give it. So we're going to hit any k to continue going to go to Windows Explorer. Then with just navigate to where you've downloaded the PDF file for the invoice. One is C. Once again, if you select that press copy puff or we can do in the command prompt type FOX, It's radar, 0.8c. Then right-click to pay subpath. And what this will do as soon as we hit enter. It's going to watch Fox at radar, posit the arguments of the PDF path to a file, and it's going to open up that file so it ends up. And you'll notice it opens up our invoice directly. So what we can do in UI path, we can take that newfound knowledge. And anything after the fox that radon AXA and the CMM probe is arguments. So we can then put the file name and the arguments instead of automated by clicking on the UI. So we'll run a lot more faster and be a lot more stable. So if we click on back to the open application folks that radar in the properties on the input arguments. Just paste that here. Okay, and with that done, we're going to delete all the activities, which is clicking on the File button, clicking on computer, browse, putting in a file name, and hitting Enter. That would actually urban afoul, since we're now using the arguments to open a file. So let's go and debug file R1 fall and see what happens. We can see here we've got an era file not found. Check if FAO was rumored, renamed, deleted. You'll notice that we use the same path in the arguments in your path. So how come it's early planning up to you up off. The reason is we have spaces in the folder and file names. Now, it can't have spaces, but there's a little trick to using that. And we need to escape our quotation marks because you can see in a command prompt, we have quotation marks in UI path in our open application, if we click on the arguments here, it has quotation marks, but in your hypothesis indicating that this is a string, and it's not actually passing through the rest quotation marks. So it's the same as if we went to our command prompt and tried to use the same command, would add the quotation marks. So let's do that now. Hit Enter and Fox that real open and you'll see we get the exact same arrow. So in order to use quotation marks inside a string, because a quotation mark will indicate a screen, you need to use the quotation marks twice in a row to indicate that you want to use an actual literal quotation mark inside a string. So by doing it twice in a row, the first one is an escape character in it says, if I have any rotation marks after this one, I want to actually use that quotation mark character rather than indicating what's inside those quotation marks is a string. So here, OK, then debug file, Ron file can see it opens out the invoice in the output. It's grabbed their invoice details and ran much more quicker this time. So most applications in Windows will actually support using arguments to actually open up a file directly. And I highly recommend exploring and looking at this whenever you can, always come back to this lecture if you needed as a reference as to how to figure out what those arguments are. Because the advantages are, number one, your bot will run much, much more faster as it doesn't have to click on a few buttons to open a file, it will open it up straight away. And number two, if the application ever updates and they update the way you click on a file button, I might move it somewhere else. Your bot will break and you'll need to recode it, whereas the arguments almost never change. So you bought is much, much more stable in the long-term. 47. Looping over files: In this lecture, you can download several Academy RPI invoices. We've gotten the first invoice. Along with that, we've got the second one, which is just charging for some invoices and emailing late notices. And then finally, we have a third one, which is charging for a price. As expert, we have different invoice numbers and also different prices. What we're going to look at in this lecture is how we can make the ball go into every PDF file inside this folder. So wherever there's one, there's trade as one hundred, ten hundred. It will loop over all of them and extracted details with specified. So what we can do is first of all, we need to get the list of the files inside this folder. And then what we'll do at the very start of the sequence will drag and assign. We're going to use this baby expression to actually get the files in that folder. So we're gonna click on value. And to do that, it's super simple. We just need to use directory dot get files and an inside a string. With this need to go to Windows Explorer, copy the path up here to the folder. Paste that in and that with a quotation mark or string. And what this will do is this will get the list of files within that folder where they've got Susannah to a variable. We use control k to create a variable and we'll call this invoiced files. What it will do at first is when it creates a variable invoice files, it's going to store everything as a strain. We want to change that to an array of type string. So from this dropdown select string. That way we can use a activity which we'll loop over h file within this array. And an array is something if you're not familiar with it, which is holds a list of strings, numbers, and so on. So instead of holding one string, it can hold multiple. Think of it as like a shopping list. Each item in the shopping list would be an item in the array. So in order to flip over them in the activities such that for h, Then drag that onto the assigned. And it'll do for H will rename the snowfall. And we'll do this in invoice files. We done once a loop over and extract the details. Before we do that in the body, we're going to add a log message of type info. And we'll put in a message the file being processed is, and then we'll draw plus an ad in a file name. And we need to use dot toString to make sure it's recently defined as a string for you, I PAF to pick up the phone and correctly. Then we can try this open application inside out for each loops. So we'll drag that in. And you'll notice it's getting quite messy now. So remember you can use the outline view here, which gives us a high-level overview where we've got the sequence, we've got the assigned, we can rename this to gets filed lifts and renamed it to get file this outline. And we'll do loop over folders in our 4H. So rename that to loop over files. And then that way you can get a good high level o u from this outline as to what's actually occurring. One final step is at the end of this open application. Once we've got the details, we need to close down flux it because it will try and open it up again for the next file in that list. So search for close application in activities. And then with that dreg, close application to the bottom, where we extract the details. And what we need to do is we need to open up Fox at reader. Then click on indicate element. Make sure you select the whole application so it's all highlighted. Now, what we can do is Ron outbox. So let's close down a fox that rate and we opened go debug file, Run File. And you'll notice as looping over the exact same invoice. If we go to the app console, it will say the file being Processes invoice one invoice, two, invoice rate. But you'll notice on Academy RPI invoice to the total price is 8 thousand. It's not 24 thousand. Apple console. So it's looping over that same file. And you'll recall we set the file name in the open application arguments. So let's open that up. And we actually specified just Academy RPI invoice one year. So we need to delete that, change that to file dot toString. And if you hit OK and run this, it's actually going to throw an error. And it's going to be the same era we saw before where we didn't have quotation marks around the filename. So how can we fix it? Now that we're using an invoice files and we're looping over each fall. Well, we looked a message info, the folding process is and a file name.toString. He go to the API console. You notice that file name, He doesn't include quotation marks around it. So all we need to do is in an open application in the arguments, we need to surround this with quotation marks. But you remember if you use a single one, it's going to indicate the actual file itself. So we need to do four on each side with a plus then fall to spring, then plus nn for at the end. And the reason for that is the first one and the last one indicates What's inside it as a string. And if we want to indicate a single quotation mark, we need to use a double quotation mark inside an actual screen itself, which is the escape character. So what this actually looks like is one that is actually evaluating. It will look like the filename dot pdf when it actually opens it up. So with that done, let's hit OK. Let's go debug file, run file. Scott, our first invoice, a hundred one hundred one here would open up invoice to now. And it seems like it's got stuck. Let's close that down. And we can see we've got an arrow. The get total price is no longer valid. So if we go to that get total price, click on the select up to three dots. You'll notice it's trying to get the name of $24 thousand here. Our second invoice has $8 thousand. So what we can do with that name, let's replace it with a star for a wild-caught, meaning it can match any possible. Let's hit OK. We'll need to do the same thing for the company name select. Yup. But all that invoice said the same company named, but it safer just to use a wildcard. Will do the website as well on the website selector. So change that name to a wildcard all. And finally the get invoice number. If we also click on the select properties, are going to change that name to a wildcard, meaning it can match any text at all. And with that done, let's hit debug file it run file to see how we went. And you notice we got an error at the start index cannot be larger than the length of string parameter name startIndex. So clearly something we changed, actually broke. So what we can do is to come back into those selectors we edited. Instead will untaken name. Hit OK. We're going to just delete, get company name, get website. And we'll leave the get invoice number in the selected properties, will change, it, will untaken name also hit OK. And then let's see do bug file, run file. We can see that the same arrow, it didn't work. So what we can do here is instead, for the get total price will go to our selector. In the name, will do a dollar sign because it always begins with a dollar sign has a number of characters. So do okay. Same with the invoice, will select the get invoice number. Let's edit the selector and rates it the name. But I've been invoice space hash, hit OK. Then let's see debug file Ron file, and see how we go this time. And we can say this time the boat successfully run. If we jump into the output, you can say we've got the total process 24 thousand. For the first file. We deleted the company name and website while when we're debugging, we got the invoice number of a 100. And if we scroll down, we can see we've got invoice to total price of 5 thousand, invoice number of 101. Finally, invoice three, total price of 10 thousand. So clearly, none of our efforts have worked so far. And this is something you'll run into quiet Coleman when you're developing processes is challenges like this. So let's take a quick break and see how we can resolve it in the next lecture. 48. Anchors: So we have just seen what happens when things go wrong with creating a process. You run into a bunch of errors. You can't resolve the issues and so on. Lucky for you. In this lecture, we are going to resolve the issue on how to get the total price. And it's a really handy feature in UI path. When I select a isn't actually getting the pace of information you want across multiple files where you're grabbing a different order number or opening up a different file and it's just getting a different value on the screen. And if you do run into anything like you, I pop. Feel free to post a question in this course. Checkup on for GIGO for any answers and looked at the UI pop community. So let's take a look at how we can resolve this now to get the total price from invoices. So what we're going to do, we're going to leave the get total process. But under activities, we're going to search for an activity called NCA. We're going to drag this up above to get total price. And it has two sections and Inca and an activity. I'll explain those in a model, but let's set it up and it will make a bit more sense. What we want to do then is under actively search for font element. And under UI automation element fund, you'll see this fine element. This sits inside the NCA psi. So I select that, click on indicate element inside the window. And what you want to do is select the total Jew texts. So I click on that, that will highlight it here. And then for the activity on the right of it, what we need to do is search for get's text. As we would usually get texts to use a UI automation element control. Gettext, drag that on, click on indicate element inside this window, and click on that process of $24 thousand. On the first PDF file, we've got RPN invoice one open, and now we've set it up. So it should actually select $24 thousand. So what's happening with this? So what happens with UI path with an NCA base? What it does is it essentially will tell us finally text hurdle Jue, Fen, search around it. So top, right, bottom and left to actually find out whether turtle Jew is, and it will automatically detect and extract this information for you. Or you can also do in UI path. And if we go into NCA based activity under the Properties tab, United has this input and composition. If we drop this down, this will have several properties. Order left, top, right, bottom, and so on. If we were to select right, for example, you'll notice the turtle Jew goes to the right side of the anchor base. The getText goes to the left side. And what that's telling you iPod is, I want to find a text hurdle Jew, and look to the left of that for any sort of price. Oh, I got to go back to the NCA base properties and select the anchor position has left. You'll notice these two activities hop around and you are path would be going, hey, let's find the total Jew. And to the right of it, I want to get any texts which represents a price. We're going to leave it to order. Usually it's smart enough to calculate the text you're looking for. And most of the time, at least in English documents, it's usually always to the right hand side of the actual anchor text. So it's essentially saying, fine is ankles total Jew. And search around it for that total price. Then what we can do in that getText under value, we can search for price, which jump back into variables that we'll call total. So it just put that in total prosperity will. And then we can just delayed our existing get total price. And then let's close down Fox at radar and then rerun our process to say, if it's able to correctly pick up the total price on orders invoices. So gonna debug file rockfall. And we can go to the API console. You can say the first one, the following processes Academy, RPI invoice one, it's got certain price of $24 thousand. The second file has total price of academy IPA, and so does the third one. So what's happening? That's super strange because in a PDF files Academy RPI is at the top. So what happens with you upon with some automations, especially using anchors and PDFs, if we can't actually see the element onscreen. So let's just say it was like this. You would have to scroll down to actually view the turtle Jew when the bottle opener files, if you had a shop, I and I'll rerun it again. You notice that the first file actually opened up with total Jew visible on screen. The second one doesn't have a visible, only has the top half of the PDF and along with the third one. So our enters not working. First of all, when we open up our PDF file in fox at radar, we actually need to maximize the application to take up the full screen. And then second of all, you'll notice, even with the full screen, you still need to scroll down. So what you can do it is influx rate of up here. You notice we have this zoom indicator of a 100%. If I type in 50%, it will actually take up the whole screen. Oh, I need to scroll it all. I can change it to 60%, so make sure I've got pretty much everything visible. You might be able to use a 100%. I've just got my screen setup to actually zoom in photo recording so it's easier to look at. So what we're going to do is make the bot actually maximize the foxes radar window and set the zoom size to 60%. So when we type in a zoom size, let's just say 50% We need to click the Enter button to actually make it set so we can send a hotkey to do that. So let's close down folks at radar and under activities to make it full screen that there's actually a maximize window. We can drag on it. So we'll do that at the very start, just under open applications or maximize a window. Then we'll type into And then we'll indicate the element on window. And inside fox at radar will just indicate the zoom size. I'm going to set mine to 60%. Feel free to adjust this to a size that suits you. So I'll just do 60 in a string. We'll call these sets are Zoom size. And then finally, we'll do send hot key. So we can actually send the user pressing down and enter key on their keyboard. So select enter from that dropdown, indicate elements, will indicate that zoom box. And once again, and we'll do this as sets of zoom size enter. And with that done, let's go debug file. It ran file to see how UP what fares this time. So you can see we've got an error now that it can't find a text total Jew. So what Gibbs? Sometimes when you're automating an application and you re-size it, your selectors, or actually no longer work because we only have half of the PDF before. Now does more text visible on the screen? It gets confused as to where the turtle Jew is. Because remember, it's like a street address to get where it is. By zooming out or essentially introducing new nodes on the screen, which are these texts items. And it doesn't know how to process this information as to where it is positioned relative to every other text item on the screen. All you need to do is if you bought was working any change, a zoom size and it stops working, you just need to go through your actual selectors and you wipe off. And we'll go to the three dots with Fox at radar open up, set to our zoom size of 60%. We're just going to go indicate on screen will select Total Jew. Again. We'll do the same for the getText, $24 thousand. Indicate on screen, select $24 thousand under target on their properties. If you go to the Select up, click on the three dots, you'll notice it doesn't actually specify. We just want to find $24 thousand only. It just finds a text bottom next to total Jew. You'll notice a proof or total Jew screenshot actually highlights it's an uprise. So let's go indicate onscreen again just to make sure we have that selected only. So we can see now total Jew is only highlight it in, in a preview. And we need to do the same for get invoice number because everything would have been affected by re-sizing the screen. So I'll select that invoice number. Remember, under get invoice number, we needed to modify this particular selector because he was trying to find invoice a 100 and just put a star after the invoice hash. Click OK. I've removed the other selectors and getText in our application. So all you need to do is delete that activity tried in the close application again, click on end, indicate element inside window. Click on the bar, with that being fullscreen and set. So there zoom size of 60%. Close that down. Let's go debug file, Ron file. And now it should be fine to go for order. Pdf's. Okay with say it's successfully processed the first one. The second one, that's up to the third one. And now if we go to the Apple consult, you'd successfully got the total price or $24 thousand for the first PDF, the second invoice PDF or was $8 thousand. And we can verify that by opening up invoice to SCO and done. And indeed the turtle Jew is $8 thousand. And finally, the third invoice was $11 thousand total price. And we successfully have got $11 thousand. So that's great. We're able to now make sure our process can manage multiple HIPAA BFS and get the correct total price. The key takeaways from this and the last lecture is number one, whenever you automating an application, I recommend always maximizing it and setting to zoom size to make sure you've got everything you need visible on screen as much as possible. You may need to scroll sometimes, but for the most part, you shouldn't need to do this. Because as we've seen, once you maximize our window and zoom size or the other activities that come off of that around getting text closing application. Actually need to have your selectors radon so you don't want to be doing the same work twice. And second of all, if you're bought is getting weird results when you're trying to get a particular item such as the total price. And it's getting different things on screen between different PDF files or different orders in an audit system, you always use the NCA base, find some texts near it that's always consistent and the same, such as in our case or total Jew. And, and you can actually select the item you want to get. 49. Invoice scraping wrapup: We have just automated One of the most common processes across every industry today, getting details from an invoice and then outputting it to a cultural and outpace. However, you can easily add, put it to Excel Sanders off in an email, et cetera. As you saw, it was quite challenging. It will simple setup, wanting voice. However, as we loop or about many different files, we run some problems actually trying to extract the data. We resolve this by using anchoring, which is a really great tool you wipe off where if you're selecting a UI element and every time you run the bullet on that same file or a different file, it's unable to find it. Anchoring will likely be always find it by finding some element near that luck, the total price, and then grabbing the total price which is right next to it, it's smart enough to be able to pick up that, hey, this total price is always to the right. So I'm going to find a text total price. And whatever's to the right will be the actual number and all extract that out. We also touched on a bit around why you shouldn't use a W licensing. And while we're using Fox at radar. And that will also be covered at the end of the course in a lecture called licensing. Really, really recommend checking that out. Because if you don't follow the law since incorrectly, the organization can face massive funds. 50. Optical Character Recognition Intro: In this section, we are going to use machine learning with Optical Character Recognition to actually recognize texts from a document that is just a photo that's been scanned in. So a typical business process might look like someone scans a document, it then get emails or sent to somewhere as a scanned document. B, that a PDF or image where you can't actually copy and paste any tags is just a photo only. We're going to use OCR to actually extract the text out of that document. So let's take a look at a demo of this, but we'll build. Our process is now going to open up the image file voice. And then using OCR is going to extract the invoice number and date in this picture. Alright, lets get into building process to recognize text from images. 51. Basic OCR: In this lecture, I've attached an invoice, which is just an image file that's been scanned by a scan out. So you'll notice econ actually select textual anything at all. So this is why we actually need to rely on OCR to get the text out of this particular invoice. To do that, we're going to create a new process. Will name this OC image. And in the description to get text from an image file. Hit Create. And that's going to create the process for us. We'll go open main workload. And with that image you've downloaded, or you need to do is simply navigate to it. And then simply drag and drop it into our project. Then we'll go to activities. We're going to try it on sequence. What we need to do, we need to load that image file first of all. So we need to use Lloyd image and we use a folder to navigate to it, will select that file, hit Open. And then any Apple we need to use control kits credit variable. Would this as OCR image hit enter, create that. And if you open up the various tab, you'll notice when you selected it actually has a variable, thoughtful image files. So there's a special one and you are powerful images and some activities can only work with images. So this is why we needed to do load image. And then to actually extract the text Roman under activities such for OCR. You'll see on the available you have UI automation, OCR, the one you want to dive into its engine. And using multiple engines here such as Google, Microsoft tesseract. If we drag on a Google one. This one, you actually need to set up an account with Google and configure it to use an API key, which is essentially a username and password. If you're not familiar with what it is to actually upload files to the services and extract the text. Usually with the big cloud providers, they have about one hundred, ten hundred free OCR convergence per month. Then after that you have to pay about $0.25 per 1000. For example, lucky for us, there's two in your path that don't require us to create an account that actually work on your local computer. And that's a marks of OCR and tesseract OCR birth quite similar in terms of accuracy and pretty much how they work. If you are using OCR and you aren't happy with the results, you might want to try. The other one that you're not using to see how compares. In this lecture, we're going to use a Microsoft Ursula. So we'll drag that onto sequence on the Lloyd image. It will take an input image, which is where we use that Lloyd image before. So if we jump to the UC OCR image variable we created hit Enter. It has various options. The main one you need to be concerned about is the output. And as to Apple, it's the first one is result. And what that will do, who actually extract the words along with the screen position? And what that means is it will grab the words from an image file and let you know with black rectangle coordinates where it's located on the screen. So Academy RPI, It would be coordinate starting at 00 and it has a rectangle around that. And then thank you for your business. That might be at coordinate 700 down and, and 200 across and have a rectangular Anna, for example. That is quite complicated to use. Vacancy is a simple one which actually worked quite well. And it's super handy, which is simply just extracting all the texts it can recognize in texts. So when n is OCR text, remember using control k to create a variable. Hit enter. And we're simply going to use a log message under that lobe level info and message of the SCR text. With that done, let's debug file, run file. You'll notice with this automation, it does not all completely in the background. It doesn't need to open up any programs or apps or anything. Which is really good because background automations are a lot more stable. If we jump into the API console. You can see here we've extracted the text. And you'll notice at work quite well, it's got Academy RPA one, george strait similitude 1000 and so on. You notice it has our website address wrong. The Be careful, it's heavy. Includes an asterix when Ana image file includes a coma. So the thing to note about OCR is that it's not a 100% correct. If you have a file that's actually been topped out on a computer printed and scan to back in, it's usually about 90% accurate. Whereas if you have a handwritten document that will drop down to about 60 or 70%. However, it's a lot better being able to automate these processes. And with your processes, you can actually have a human review the results at the end or have some exception handling if it doesn't quiet extract the texts you're looking for. But we can see it's done quite a good job given it's just an image file. So let's take a quick break, but we'll jump into the next lecture where we will look at how we can actually specify where on this invoice we want to get text from. So we could just extract the invoice number only, for example. 52. Screen scraping setup - open file: Alright, so what we need to do now is we actually need a process to open up that image file. Because we're going to make it actually extract the only the information specified using OCR, such as the invoice number, date, and so on. So what we need to do in this lecture is setup. But to open this file, now it might look easy at first glance. So let's just run through it. What you do is just go to activities, go to open application. As you would open up any other application, you could indicate window on screen and you'll need to make sure you have that scanned image open. Let's indicate that indicate the photos app with a scanned image. And now let's just close that down and go debug file Ron Paul and see what happens. You can see our process has finished running. It'll open up the photos app. However, it hasn't opened up the file we wanted to. And you'll notice with the windows Photos app, there is no actual way to specify going File, Open File, and selecting a fall. Like we did earlier with folks radar. You've got various options, but as you dig through them, there's no way to open up the specified. Wow. So you might think that's a K. We can use the technique we use in flocks that radio to actually specify the file name and arguments. For most applications, this will work. However, since this is a inbuilt Windows application, it behaves differently. If you select this open application activity under the Properties tab, you notice the input filename doesn't have a full path to an executable file. It just has this Microsoft Windows photos. And if we copy this l sin Control-C and go to command prompt and paste it in there and hit Enter. It can't actually opened it up from command prompt for us to use the help command to see if we can open up file directly. So let me show you how to work around it now. And this is thanks to a solution on the UI path community forms. So if you ever get stuck, I highly recommend checking out the forms. What we can do is we can use an activity code starts process. And in the execute, well here we came to do C and a string, whole slash Kelo case windows slash explorer 0.8c with a capital a and make sure you spell it right. And then in arguments, what we need to do, we need to go to our image and Windows Explorer using that handy dandy copy path. Let's put that in here. That will be surrounded in a string already. And what the stock prices will do is this is going to open up Windows Explorer, which is what you see here to navigate your files and folders on windows. And it can actually take in an argument with a file name. And what this is doing is it's essentially going to Windows Explorer, double-clicking waterfowl. And whatever default application opener opens it up, will open. So if we go debug file, run file, you'll notice now it actually opens up the photos app with that invoice, we want to append super handy. And just before we get into the next lecture, remember, if you're automating Windows applications, where possible, you want to maximize the actual display. So to do that with a stopped process activity, it's super simple. All we do is after the stop process, we do attach windowed search for Attached window Andra activities. Let's drag that on there. Go to indicate window onscreen. If you Photos app isn't open, press F2, select the form it taskbar. Make sure we have actual invoice open. So this epsilon again opened the file, gives a quick polls and now we can select it. So click on that. And what this will do is it will actually open up that file in the photos app and then it's going to attach everything inside this activity will relate to that Photos app. So you can say here with a selector, if we click on the select on the properties, that's got the photos app, total of photos. And if you go, you'll notice highlights the photos app. So that's working correctly as we'd expect. It has nothing funky. Blackout previous lectures around having a filename inside the attributes where would only work for specific file. And all we need to do now is under activities dragging, maximize window inside that do. Let's rerun our process to make sure that works. Debug file, run file. You can say it's finished running and it actually opened up fighter full screen. So now this is setup for our OCR screen scrape off. So let's take a quick break before the next lecture. 53. Screen scraping with OCR: Okay, so now that we have out process setup to open out invoice photo. When it got down to go debug file raw info. We're going to let that open up Pat invoice. Because what we're going to do now is use to screen scraping wizard. And we're just going to set it to specify to extract the invoice number only. As I mentioned, you always want to maximize your application and have it in the same position every time as it's actually going to tell it to extract the text from this rectangle. So all you need to do for that is go to your puff. And then all we need to do is go to screen scraping up in the top toolbar. Then we need to use f2, make sure we have our photo open as some would have it open. So you want to have open up full screen in the exact same dimensions to, but we'll have open because even if it's moved a little, it's not going to extract the invoice number that we're going to look at now. So let's select the actual image itself. So you notice you can select the whole application. We just want to select the image itself with that highlighted in a blue window. Let's click on that. It will take a second or two to pop up. But now we can see the scrape result preview where it's actually being able to scrape out all the content of the whole invoice. So we've already done this. So what we want to do is has indicated NCA has a UI element. If we try in USA, because this is an image, it won't work at all. So what we want to do is select a region and you'll see this red curse out. So we're going to at the top left drag a box over invoice as always. And then it will say full text method fail to scrape this region. So full text will only work on a whole image. It can't specify just the invoice number. It's a result that we simply drop this down and select OCO. Hit the refresh button. And you can see in the scrape result preview we have invoiced to I one. Now, you might get a comma instead of a hash here, or if not a character. If you do just change the scale to, to hit refresh, and that will slightly tweak the settings. So if you seen the incorrect characters, try and adjust this from one-to-five until you get the text you're looking for. Wave dying to use Microsoft OCR has an OCR engine. You can also use tests erected here. Then I need to do is simply hit finish. And you can see a process now has these screens grap sequence added to the end of it, where it will attach to the window Photos application and then get the text for the invoice number. Now we already have an attached window and maximize it. So what we want to do is all we need to do is drag out this get OCR texts activity. That's all we need up into. Our existing one, will drag that onto the maximize window. And then we'll delete that scraped Skype unsaved once because all that's doing is attaching to our Windows Photos application. And if we select this getText, OCR Academy is going to output the results to a variable called texts Academy. That's not going to exist anymore because we deleted that screens griping sequence. So just delete that, use control paid to create a new variable in text. We're going to call this invoice number. Hit Enter. And then we'll add a log a message activity to log it out at the very end. So drag a log message at the end to infer will do invoice number. And you'll recall that sometimes when you're selling a variable, the sequence, in this case is only to do skirt. So our log message is outside of that activity and so we just need to change that scope to those be various sequences. You can see one has, if you hover over the second one, had slash sequence, the third one just has sequence only. The third one would just sequence early, will be the whole actual process itself. It goes. So also renamed the sequence to something else, black invoice, scraper. And then if we go back until I get texts, OCR academy, you can say sequence scope is now named invoice scrape up. So what's a lot more easy to understand which activities has access to that variable. And then in the log message will now have access to the invoice number. So in message will do invoice number. And our previous steps or actually logout the whole image. So we're just going to simply delete that Lloyd image, that Marxism OCR and that log message. And just leave this thought process remaining with attaching to the window just to extract the invoice number only. So let's go debug file it run file. And if we go to the API console, we can say invoice number two, uh, one was extracted successfully from a photo file that had been scanned in. So we're going to take a quick break and then the next lecture, we'll add another field as an activity for yourself to follow through. 54. [ACTIVITY] Add your own field: And what I want you to do now is select a particular atom from the invoice and you screen scraper yourself to extract the details. Also solution on how to add date. It's up to you what feel to add. So I recommend pausing here and going ahead and trying it out itself. Okay, welcome back. Let's take a look at the solution as to how we can extract day. It's pretty much the same as what we've done to attract invoice. So what we're going to do is we're gonna go to your iPod. He might think, because we've already setup screen scraper, we can simply add another get OCR texts activity. So that would be using get OCR text and describe that in on that one. Can see it's got tesseract, OCR. We could change this alpha marks of their CEO. But let's go into k element inside window, select our invoice. But you'll notice it doesn't actually let us select a particular region. If we go back to the ghetto OCR texts for the invoice number, if you expand target on the properties, it uses this clipping region, which is essentially the coordinates of where the invoice number is on the screen. So that's why it's important to maximize the window and have it in the same place every time that follows, I'd wind up in this get RT-PCR texts activity we just added. The clipping region isn't set. You can define it manually busted in a numbers. However, this is quite painful. And unfortunately by dragging and dropping activity on, you can't use that screen scrape a wizard to actually a rectangle over detects you want to get. So what I recommend doing is always if you want to add a new item or region to the screen scraping, or you need to do is click on the screen scraping once again, we'll select that invoice. The wizard will pop up in a moment. And we can go scraping method will use Microsoft, will select the rage. And again, we'll drag a box around the dates. Can say here in the scrape result preview we have that day. So we can go finish. And it will add a lot of scaffolding overhead around the screen scraping. Remember we don't need this, so we can just drag this, get OCR text to the next one. Will delete this green escaping defaults I will added and will rename the invoice one to get invoice number. And we'll rename this one to get invoice date. Remember, we'll need to set the variable as well. So using control k, We'll set it to invoice, date, hit answers, credit, and on daddy variables tab will need to change that scope through the whole sequence or processes, so which we've renamed to invoice scraper. Then we can copy that log message pasted in again and logout the invoice date. Hit enter. And let's run our process debug file, run file. And let's take a look at the screen scraping. So it's run quite quickly. And if we jump to an output, it's locked. The invoice number and a date to the console. 55. OCR Wrapup: Believe it or not, many organizations still use faxing scanning, which results in documents being completely unreadable. That'll just be an image file. Luckily for us, we can actually read these using OCR. As we've seen in this section, we walked for how we can read all the contents from a document and output it in a UI path gold. So and then also specify certain section of a given document, such as an invoice number and putting that sort of console. So this is really powerful in a situations whereby for whatever reason, he doesn't have the actual text content of a file, you've just got an image. You can actually still extract that information and have a process do some operations on it. 56. Machine Learning with Pokemon Intro: You know, let your title, if you have a say, Naxi visual Pokemon, it was absolutely massive and it is still absolutely a massive game and enemy. In this section, we are going to train our own custom machine learning model. So a user can click on an image of a Pokemon and it will recognize what Pokemon, It is really, really powerful. So we need to train a model and we're going to do this using Firebase. We're going to give it various images of different Pokemon just to train it. Wants its finish training. We have a model that we can then use some Python code to call with an image of a Pokemon such as pick a True to recognize it. Then we're going to use UI path to call that Python code at present that Pokemon to the user. So let's take a look at how we will use this model within a process flow and you wipe OK. We're going to allow the user to take a screenshot of anything on a screen. We're then going to say that screen shot to the computer, such as an image of a picker chip. Then the Python code in UI path will get the Pokemon based off the model and screenshot and showed a Pokemon to the user in a message. So let's actually take a look at how it works. So when we run this process, what happens is it takes a second for it to light. And then you use a can indicate anything on a screen. We're going to select one of the char thoughts right here. Now, once we click on it, it comes up telling us it's HR is odd. Let's do the same again. Time for a picket should text a second alloyed. Then we're going to click on one of the picker choose onscreen, which will take a screenshot of that loaded up. And our motto recognizes, it's a picker Chu. Okay, so now that's how it works. In the next lectures, we are going to build this out. This is a more advanced section of UI pop, so feel free to follow along or just watch. You can download all the resources on the go and also the complete solution at the very end. I'm really excited 40 section. It just really shows you the power of UI path, combining different technologies altogether into a single process. 57. Installing Python locally with Anaconda: Okay, so first of all, in order for UI path to use Python, we need to install Python and insource on packages, which allow us to use machine learning with a custom model to recognize Pokemon, implant them. So that's pretty much essentially in your path. We've installed dependencies for various activities and which already traded out on a library for the audit system. So in Python land, it's essentially installing its own machine learning packages. So all you need to do to install that is head over to her Anaconda.com. You'll see a getting started on the landing screen. Just jump into that, go to sea or under Connor products. And what you want to do is download the individual edition. It's free and it makes it much, much more easier to use Python on a Windows environment. So if we just go learn more and say here we have a download will just go download. Will downloader or Windows will do 64-bit. And once that's downloaded will install Anaconda three. Alright, so I've got Anaconda fray downloaded. We're just simply going to double-click it and run through the install process. Go next, a gray underscoring the muscle it just for me. Next, we'll leave the default folder there next. I've already got it installed, but we need to do is go next, finish off the installation process. And once that's done. Or you need to do is in the search bar type in Anaconda. And you'll see you have various and kinda prompts such as Anaconda Navigator and the corner prompt and the conduct PowerShell prompt and so on. We need to use is the anaconda prompt, and we'll have Anaconda three in bracket. So click on that. And this will open up a command prompt for Anaconda. Now we're going to take a few steps here. I won't go into detail as to exactly what they do, but we'll give an overview of them. But what you need to note is this is just setting up a Python installation that will work with our machine learning model to recognize Pokemon. So to do that, all we need to do in here is typing conda space creates dash n pi 3-6 underscore t F2. And ad space python equals 3.6 and hit Enter. And then we'll ask you to create an environment, hit wide to create it. And what this is doing. And just keep on hitting enter as it's going through. Is this is installing Python 3.6 in a folder for us with a name py 3-6 underscore t of two. And once that's done to activate at typing conda, activate pi 3-6 underscore t of two. Hit enter. And this is a Python installation where we're going to install some tense flow packages. So can use machine learning. So to install those packages at super-simple, we need to use a Python package manager, which is called pip. So it's going to do pip install sensor fluid. Can enter. This will download and install. It might take a minute or two. And this is just installing the TensorFlow package into our pi 36 underscore t F2 directory. All right, now we've got tensorflow installed. There's one more package we need to install. And to do that, just do pip, install pillar, enter. And this is an image manipulation library which will allow our Python code which I'll be providing to convert our images into a format that works with the machine learning model. Once that's done to verify that's all good, we just need to type in conduct List, hit enter. And you'll see a bunch of packages installed here. What you should see now in the list is eat TensorFlow package here there'll be a few items and a pillared package. So with that done, we're going to take a quick break before we move on into actually training our model using Google Firebase. 58. Training the Pokemon model with firebase: Okay, so now it's time to train our machine learning model to recognize Pokemon. There isn't dataset on title you can use. It's called Pokemon generation one. It will have about 40-50 images of every Pokemon in generation one. However, I'm going to use a different dataset which say subset of this only includes about 40 Pokemon, which you can download it in this course. And the reason is that we're going to use Firebase to automatically train our model for us without needing any kind at all. However, the limitations of training a model in Firebase is that you can't have more than one gigabyte of images and 1000 images. This dataset has well over 1000, so I've cut it down a bit. And for each Pokemon, it need at least ten images to train the model to be able to recognize it. So I've got about 40 Pokemon with that 12 images that you can download to train in a dataset dot zip folder. And then to try and that we're going to use something called Firebase, which is a Google product. You can find that at firebase dot google.com. It offers support for development, things such as databases, mobile apps, machine learning, and so on. The really good thing is we can just upload images for free. It will train a model for us. So signup to Firebase. And once you've done that in the top right, this go to the console. You will then see a screen like this. Just go add a project, fill out some project details and hit create. Black actor name on test. Continue, continue. You will need to configure Google Analytics account. And then we need to do is go create project. And once that's done, you say a project overview here. I'm just going to use an existing project of God for a game that I was making what's called Flappy Bird. And you can pretty much ignore everything in here. The only thing we need to look at is the machine-learning under develop. Then obey an order ML tab. And this is where we are going to apply to our Pokemon images to train a machine learning model. Whereby we can give the model an image of a Pokemon hasn't seen before, and it will be able to guess what Pokemon It is. So good at dataset. We'll call this Pokemon. We're only going to do single label classification it create. Then in the edit dataset, we just need to go and browse for files, fanout dataset of Pokemon. And, and that's going to upload all the images depending on your internet connection. This might take quite awhile, first of all, to upload the images. And second of all, it will actually to train a model which will take another hour also. So just leave the uploading and once that's uploaded, we'll come back and look at how it transfer model. And we can say here, mine's just applied a now. So it's currently training. So you can always close down your browser. Come back to the machine learning, develop tub. There are two order ML. So go Pokemon, Go view. And you can see you date data import is in progress, was importing and training. And when this is complete, it will have additional details. So let's fastforward to say, uh, incomplete. Okay, so now in a machine learning model we can see we have images uploaded now. So if we have you, we can go to Edit dataset. It will have label images because they've already been categorized into folders that already have the labels. So if I select Pokemon such as picker, true here, you'll only have images of Picot. Sure. But I select tried to not only has images of a drag, not Pokemon. So what we can do now is since I already labelled click on train model can give you a modal I name trees options. We're going to leave it at default. And the training Tom will take one compute alpha, so I select that. Now, all you need to do here is make sure you select all images so none of them are filtered at all. Then hit trained model, can give you a model, a name, some options. We're just going to live to devote. And you can train it with one fray compute alpha. You have a few free hours a month. So good scheduled training. It's going to cure for training. This typically takes a few hours, so come back in a few hours and we'll phosphor to save. Our model has been trained. Okay, now our training set has finished training. You'll see when you light it up the model and the models will have shining complete. And to jump into that, just click on the model. Okay, so we're back now and modal has finished training. You can say on the models is called chaining complaint. And to use it, let's jump into the model. And then inside here it will have various statistics are and how actually performed. And what we can do is that we can go to test model and we can images that the model has never seen before, and it can guess what Pokemon it is. So I have an image of a picker, true? So I'm going to drag that on and we can see if I can guess, it. Can say here, it gives us the prediction with the top ten labels. It's guessing that 50% chance is pick a chair TO percent chances Cuba and 7.1% is almost o and so on. Such correctly guessed picket. Sure. I've got another Pokemon which is ADA CUDA, which says legendary Pokemon. Let's say how performance now it correctly guesses that it's odd akin or as the top result. So you can download other Pokemon images and test them. We're going to implement a new I pass in enough. In order to do that, we're going to up the top a bread crumb trail, jump back into the evaluation of the model. We need to go to use modal. Just download. It will prepare our multiple download and we just need to download that. Once it's prepared. We can say it's ready now, so good download. And what that will do, that will download three files in a zip folder called data.txt, manifesto, JSON, and the modal. So you need to keep all these files, put them in a safe place. I've already got it downloaded here. And I model folder where I've got the did, the manifest and the TensorFlow model file. So let's take a quick break in the next lecture. We'll look at how we can actually use it and plot them. And then we'll look at how we can actually run Python in UI path and use our model within that. 59. Running our model with Python: So now we have trained a model. You should have downloaded the model and the Pokemon images. If not, you can also download it intellectual. And I've also got some Python code here that you can download. I'm going to show you how we can use that path and coding and a condo which we installed earlier. Then in the next lectures, I will show you how you can actually load that up in your iPod. But for now, let's just focus on the parking pot. First of all, before I jump into it, let's go back to one of our previous spots were created, which is around an ordering system. The reason why I want to come back to this is somewhere a bit familiar with how Python works. It's good to draw an analogy how another system works that if you move sometimes, and I want to draw your attention to the top in the order number. If you click on this, you can say this properties to the right side, we've got the text as 1-2-3, and we've also got the text is 123 here. If we delete it, it asked to provide texts that must be quoted. What that is. Typically in programming, if you have an activity or step and you need to give it some sort of data. It's called an argument or parameter in pattern is called arguments. So think of an argument in Python similar to you. I puff how you provide these arguments to activity steps. And I'm going to jump into the script, which will allow us to actually predict what a Pokemon is, going to be worried about it. And you don't need to understand the Boolean detail. Or you need to know is how to actually leverage it and use it. And this script could be using any other machine learning model you create whatsoever. So let's jump into it. So this is a predicted path script you can download in this lecture and might look quite scary. But all you need to know is up the top here we have this predict function. Think of this as similar to lack a UI path activity. It's essentially a step which does something. And what it's going to do, it's going to take in an image path, which will be the owl Pokemon image. It then takes in a model, which will be our tensorflow model. And it takes in labels which will be at dictionary file. We just downloaded it. And if you haven't opened that dictionary fall is just essentially a notepad document of the possible Pokemon that an image Kobe. And what we're going to do, we're going to call this function. It's going to go through a bunch of TensorFlow code, which will eventually return us the top predicted Pokemon that it has. So this is the function we're going to call on your iPod a bit below, we have this main function. And we're going to call this from Anaconda directly. And all it's doing is saying, when we run this Python script, we need to provide an image, a model, and labels. So settlements a UI path in our time order number, we need to provide it with some sort of text to type in. We need to actually provide our Python script. With some arguments with the path to the image we want to process the payoffs in a model and a path to the labels. So let's see how we can set that up now show it. So what I'm going to do, I'm going to open up Anaconda again, the anaconda prompt. And the contact rate. You'll notice on the left-hand side says base, we created an environment quarter pi 36 underscore TiO2. So make sure if that isn't already set to that, you switch to it by typing conda activate. Pi 36, underscored CF2, hit enter. Now we can see on the left side we've got pi 36 underscore TiO2. And she uses predict script, or you need to do is go to download or on the computer. I copy puff. And then all we need to do is in Windows Explorer without predict script, go copy path, then any anaconda prompt, type in cd, paste that in there. But let's get rid of the predictor pi. Hit Enter. Since mine is on a different driver on the computer called the afterlife I additionally, f colon can enter, and you'll see here now we have the hoop after that photo which is f c mu UI path, you apart foundations, Pokemon modals. And if we type in the command DIO, that will list all the files in it. And we can see we've put our predict script, applicant u two and so on. And that's all exactly the same as what you would see in Windows Explorer. So by moving here, we can actually call this predict script and provide it with our image. We want to do the prediction on the model and the dictionary. So to do that, open up your favorite Notepad editor. I'll go one down boil highlight using VS code. And I'm going to show you the steps, how we can actually call this grips around. So we need to do is do pause them, predict the plot. That's going to run this predict or script by default running from the command line. And Anaconda is going to run this function here. And it's going to take three arguments and image, model and labels. The image we can provide straight away. So I'm just going to put a place order now will do image underscore path. And then for model to provide that and we need to do dash, dash modal. And then two equals. And then we do model underscore path. And then finally we do dash, dash labels equals labels on the skull path. So we need to fill in the blanks here. For this image pump that's going to match that image argument for that modal PAF. It's going to match this modal argument. The labels path is going to match its labels argument. It's going to call our predict function and our Python script, which is locked in activity in your path. And it will run through some TensorFlow code, which will return the pertinent image. So the easiest way to do this is since we've got the placeholders will first of all, the image path. I have this bigotry image I used earlier on my computer. So highlight that, select Copy path in Windows Explorer. Then double-click not to select all of it, go right-click, paste. And you'll say puts a footpath to pick a tree image that I'm just going to toggle a word wrap. So wraps down on to the next line. For our model puff. We need to select our module.js fly that we downloaded from Firebase. It copy lbf, double-click modal underscore path to selected, all right-click and Paste. And finally, for our dash S labelled with labels Puff, we need to provide it without data.txt, say select Copy PAF in Windows Explorer, replace labels off of that. And the end result would be Patton predict apply the full pop to image the path to our tensorflow model and a path to our tend to floor labels. Through that down. We can copy that out. And we've pasted that into our anaconda prompt now, hit Enter up. Some texts will come up. It will take a second or two. But we can say it successfully predicted pickets your hair. We can copy that same command we run. But instead, let's change that model to the ADA curating image we have. So I'm just going to hit F2 to rename that, copy that text out, replace picture with it. And this is the image of ADA Cuno, which the model's never seen before. Copy that out of our notepad, jump back into Anaconda and I've pasted that. So we can say you've got Python predict dot pi, r, otoconia image, Amador path, and labels puff get into. And we can see we've got an era. And that is because they are the kinda image is a JPEG or a PNG. So let's change the other Cuno dot PNG to the correct file. So let's go through I filename, JPG, ends up, you can say here, it found it successfully. The other Cuno Pokemon. So that was quite detailed. And don't be afraid of this code or you need to know is you just provide it an image, your TensorFlow model, and the labels that you downloaded from Firebase. And it will just return you the top Pokemon. It's predicted that it is. And we're going to take a quick break before we look at how we can load this pathogen in UI path and run it directly in UI path. 60. Python in UIPath: Now it's time to look at how we can use our Python code in UI path. So we're going to create a new process. We're going to name this Coke edX. And in this friction would do use machine learning to recognize Pokemon. Going to hit Create. And with this open up before we jump into our main.xml, just go to the dependencies, go manage. We need to go to the official packages search with Python. There'll be a UI path python activities. We're going to go to install, save. And that will install the activities for us to be able to use our Python code to recognize Pokemon. So now under activities, before we go down, we'll jump back into our main dots. I'm going to search for Python. And you can see under app inverter you have Python, you have various items. What we need to do, we need to do a Python scope. So drag that into our main. And what that will do is this is going to load up an instance of Python that we've set up in Anaconda. So everything inside it can you set particular pattern version with all the packages women stored such as TensorFlow and pillow. So important scope. We need to give it a path and it's got a target inversion for the path. If we open up anaconda prompt with Anaconda, afraid, we can type in Conda a in the list. And it's going to list out the directories to our Python environments. The one we created earlier was applied the traces. And this goes here too. So you just need to put this path hit into your input path right here. So I'll just paste mine in there inside a string. Hit OK, the target. I've got a 64-bit version and stored if you follow the same steps, you do as well and version, it can set it automatically detected the one-way using his patent for a 0.6. So I'm just going to explicitly set that from a dropdown. And now to actually run some Python code, we need to use this load Python script inside the patent's scope. And this is going to be a path to our python file. So previously, we will looking at this predict dot py to predict a Pokemon. The four years that I have this test UI Python script, and all it's going to do is return hello to us. Say can download that in this lecture or course. So I just need to go to the off on Windows Explorer with that. So I've got it here. Test you, I'd apply. You can deselect that. Hit Copy puff, jump back into UI path. No patents group puff. We're going to put that full path inside a string here. And then what that's going to do it that's going to output a result which is essentially the script we want to use. We're going to create a new variable called script, which is loading of the Python script. And then to actually call this test function and return hello, we just need to use the invoke Python method under that and 40 instance. We just need to give it the script we just output from the previous activity and a name. We need to do test in quotation marks. And that name is referring essentially to name of this function here, test. So it saying in this test UAG apply, I want to call that test function. And in the outputs we need to Apple the way Python objects or name a Python object will do control k new variables to plot them. Object, the enter. And then to actually grab the results of that return Hello as a string, we just need to use the get Python object activity. In the import it requires a plot that object. So we'll use the path and object variable we just created. And then it has this mask and has a type argument. This has several things such as a Boolean which is truffles, integer, which is a number, a string, or an object by default, or a data table. Remember we use a data table forks like an Excel table and an array. Sorry, you need this type argument to match the type that was returned by Python. In this case, we are returning a string. We can see it's in quotation marks. If we had a number size such as return what this type argument would need to be int 32, which is a number of them. But since we just want to string with Hello, we're just going to say, set that to a string. And then we can take that and output that toy results. We'll call this L hello message or create a new variable, call it hello methods. Hit enter. And finally, we conceptual message. And we're going to use a message box, actually pop up the output of that Python scripts. So for text we're going to do tell a message, hit enter. Now, if we go debug file, run file, let's see what happens. I can say a message box has popped up with the text alloy, which is what's in our test script field to changes, to say hello and your name. Save that file and rerun that same file. You'll see the message box will now say Hello, Android can see it's now Hello Andrea. This is how you run a Python in UI pop. There is quite a lot of overhead to it in terms of setting up your path and scope and then learning your path and scripts, invoking your path and method, getting the object and so on, just to get that message. But the great thing is Python is really good for machine learning. You don't need to know how to code it. You just need to know how to actually use it. And we're going to take a quick break in the next lecture. We'll see how we can implement prediction script. Say implement this with UI PAF to actually give it an image of a Pokemon and return it. 61. UIPath recognizing a Pokemon: So now that we have Python running in UI pop to output some sort of message, let's look at how it can actually use it to integrate with our machine learning model to recognize Pokemon. So we can use UI path to give it an image and the aura time, the Pokemon in a message box on the screen for the user. So if we take a look at our predict doe pie, which you should have already downloaded if you haven't, not to worry, you can also download it in this lecture or course. This prediction takes in three parameters, the image, puff, model and labels. So we're going to set those up and you, I pop and then make it so it will call this predict. So to do that under activities, we're going to use a sign. So it's searched for a sign. And what we'll do is before we invoke that Python method, where first of all, going to use Control K. So you set a variable image pot. Then you can download any Pokemon image that was in the training data. Remember we have this dictionary file which lists the valid Pokemon. So I'm going to grab the bigotry image once again. This one here, going to select copy puff. And I'll paste that in the baby expression on the right. So that's going to assign the full file path to that. Pick a true image, suave arable image path. When I copy and paste that a son. On the second one, I'll delete image coffees controls K, and create a new variable called modal. Then I'm going to go to our model or our TensorFlow model that was downloaded from Firebase, copy path in the right side, paste that in. So we have the path to our model which we'll recognize Pokemon. And finally, we need our labels, which is our dictionary dot txt. So what we're going to do is the final assign ways Control K and create one called labels. Then on the right side, we'll copy that dictionary and paste that in here. So now that's done. We need to call this predictable pot and call this predict function. So I've got the files stored here, going to go to Copy path. In a lord Python script. To change that tests UI has the full path to our predictive script. Go OK. And then what we need to do is predict when a deposit image pop the modelling labels. So any invoked pot the method, we're going to change the name from test to predict. And to pass in as parameters, we just need to go to input parameters. Can open that up with a properties. And supposes in we simply use these curly brackets here, also known as mosquitoes brackets. Sometimes we need to pass in an image path as a variable. Then we're going to do the modal comma and labels. So this will essentially match up to those parameters taken and why a Python script passed in from the UI path variables we assigned it to, so hit, okay. And then finally only get plotting object. We were outputting the results a hello message. I'm just going to output that to Python results now as a new variable. And then in the message box instead of eating hello message always plot and results. Just so it makes a bit more sense. And now we're done. Sorry. We're loading up abrogate model. We're passing in a bigotry image with a path to the model and the labels, it's going to run that and return result. So go debug file, Ron file. And it takes about ten seconds to run, but we can see it came up with picker true. So we've successfully train the machine learning model of Pokemon. Given it a Pokemon hasn't seen before all in UI path and it's returned the Pokemon. So this might seem like a novelty, but this can be used for a wide range of things. If you have a process which needs to scan documents and arrange them based on the document type. And he just got photos or PDF files. You can use machine learning to automatically sort there's, rather than have a person manually sorts it. So it's really giving new functionality to RPA automation software to be able to do more and more tasks that they otherwise couldn't before when we didn't have machine learning. If I jump back into the image path and I go to auto tuner, go copy path. And I pay set in the any assign a debug file, Ron file. Give that ten seconds again. And it's going to pop up predicting that it's auto tuner. So really cool. So we're going to take a quick break before we jump into the next lecture. 62. The really fun part: Okay, I'm really excited for this lecture because I'm going to do something really cool. Going to allow the user take a screenshot when the body's run of any where on the screen. And we're going to feed that into a model and try and detect what Pokemon It is. So what you need to do is just create a temporary folder on your computer somewhere. I've just created one here in my C drive in a temp folder. It's called UI path. And this is just going to store a temporary screenshot that the user indicates on this grain that they want to, the tech what Pokemon That is. So let's jump into it. Okay, so what we're going to do under activities we need to search for indicate on screen. We'll just drag that on Deloitte Python script. In the Apple, we use control k to create a variable called element. And what this will do is, this will allow the user to click anywhere on the screen to indicate an element for automation. In our case, we're going to screenshot it. And then we'll do take screenshots under activities. So grab takes Crenshaw. Under the Properties tab on the input, the elements we're just going to pass in the elements. We just got from the indicate on screen activity. And then in output, we need to output a screenshot variable. So do control k. We'll call that screenshot hill into. And then under activities we need to search for Save Image. Try that on the image we're going to use a screenshot variable and a file name. We're going to use this little folder icon. And now I'm in my C drive under the folder temp UI path. And getName is screen shots. P&g. Hit save. And then let's copy that whole path. And in aside for image path, instead of using other Cuno picker troupe, led then to pace that screenshot path. And before I jump into the details, I'm just going to run it and show you how that works because that's a lot more easy to say how it works and what the steps are doing. So what you'll need to do is search for any Pokemon that's in our dictionary dot txt file. I'm going to set for key bone. And then we're going to go debug file rod fall to run your process. You'll notice we get the selector as if we were actually automating an application. This is the indicator on screen activity. We click on one of the Cuban images. We can see it comes with a message box saying it's Kieran and what it's done. In that temporary photo. It's actually taken a screenshot of that story in a and fed that into our model to written out or Pokemon it is. I can search for Charles out Pokemon. And then what I can do is I can then go debug file, Ron file. Who do we discharge that here? It's found at X-chart Azar. Let's run it again and let's select this blue chars are the MIGA evolution. So if I click on that, it thinks it's a goal that, that's because L model was trained with the normal Taras odd, not a blue one. So just know that the machine learning isn't always a 100% accurate. But as you can see, it's quite impressive how good it is. So just jumping back into their steps, what they do is, as we've seen, indicate on screen, that will allow us to click anywhere on the screen and outputs that item to a UI path element. D. Take screenshot. We'll take the element and then output it to a screenshot which is an image variable. Then let's say they need to actually save that screenshots to our computer. And then we can assign that to act in each path which will eventually run out predicted dotplot, which will take in that image path and recognize what Pokemon It is from our model. 63. Pokemon Wrapup: This was one of my favorite sections of the course because we combined machine learning with a sprinkle of Python code and UI path to actually create a model which will recognize Pokemon characters and then tell us what that Pokemon character is. It's combined a lot of the things we've learned in this class today. And this area's only going to grow significantly in automation. The kicking tonight is what we use Pokemon as an example. You could try and any model you wanted to add all for machine learning such as recognizing documents. So say you had a tame which received a bunch of different emails with different document types. And they will manually sodium into different l in boxes based on an image alone, you could actually create a process to train a model based on his images and take those and automatically classify them for you without the need for somewhat humanely drag and drop that into an inbox. It turned into The occurring with, you can just take my Python code and this can be applied to any of those models at all. I really hope you enjoyed this section as much as I did. 64. Developer Standards : Okay, it's time to take a look at develop a standard UI path. Why should we care about developer standards? Well, they allow us to help in the development of processes, making them easier to read, to be able to understand, and to be able to maintain them. It will allow us to have increased speed in building processes by reusing a building blocks from several different processes where we need to do the same thing, making it easier to develop because you know what standards need to be followed, makes processes a lot more stable in production for a quality assurance and so on. And also with governance and making sure you're following a legal requirements of the contrary, your, IT requirements within your organization and so on. So let's take a look over some example, develop standards. You will be able to download this in his lecture or cause these are just some good practices to follow and feel free to modify this and make it your own. It's going to vary from organization to organization. You want to give each activity a useful name. And shortly activities have screenshots. So for example, the bottom activity here doesn't have a useful name. It's the type into default. Or as a top one's good, it's got type into product code. So at a glance, if I'm ramus process for the first time and someone else's developed it. It's much, much more easy to understand what's going on. Credit activities are okay to use such as Python. However, you want to make sure they do one function and one function only for every step that cause a code. And you want to make sure that order rule so you can track if something did go wrong, what went wrong. Because when you're interacting with production data, you really want to make sure you can reverse any changes if possible. Any processes must be peer reviewed before going into production. Especially important when working within an enterprise, in a team, you want to make sure your colleagues review your activity to give you feedback on things that you might not have considered. Or there might be an easier way of Paraguay to actually go about building, to actually go about when you're building your process. For Excel documents using Excel application scope. Remember, this will require Excel to be installed on a computer in order to work. However, it offers a lot more functionality than the workbook functionality in your path. And show that simulate type is checked when talking to inputs. You'll recall that it actually is double the speed as a default setting, it will be compatible with most applications. And if it doesn't work, then simply fall back to send with their messages and then devo if that doesn't work. And finally, you shortcut keys in a program where possible, rather than a click Activity. This might be using control S to save something, Control a to select everything olds FOR to shut down our program. The reason for this one is Showcase rarely, rarely change over time. However, when a program updates Dui might change slightly and break a process. So to lope must able to shortcut case. She have any yourself that you have seen. Feel afraid to add a comment to this. And remember, you can download this in this lecture and modify it to make it your own. 65. UI Path Community: If you haven't already seen it, I highly recommend checking out the UI path community forums. There's a massive community of fellow developers and process automation experts. And if you ever get stuck on a problem and you Google it, you'll likely get some random form links, but most of them will lead you to the UI path community. So you can also use a search functionality if you're stuck on a problem or if it's not documented anywhere, feel free to post it either in this course or jump on the community and make a phone poets. Generally it's really, really active and people are super-helpful. So recommend bookmarking it if you haven't already. 66. Licencing: So this certainly will not be the most interesting section of this course, but pay with him for a couple of minutes because it does have some pretty significant impacts. You need to keep in the back of your mind that leaves when you are automating processes. So why is licensing so important? Some applications have specific lessons in either excluding or placing restrictions around automation software, such as you wipe off. You always want to skim through and giggle any licensing requirements or major pieces of software using automation, especially as a scale, if you have 50 watts and 20 of them are using the same piece of software, you definitely want to be aware of any licensing restrictions or Anna software. Two notable ones are Adobe and Microsoft Office, which we'll jump to in a moment. And I'll just go to a personal story. I actually had a friend who worked for a large technical company. What his job was to do was to literally find people who abolished in-licensing, hop on a plane, fly to the company's office and pretty much tell them you need to pay for your licensing or you're going to face a massive fine and damage to the company's reputation. So this is why it's super important to keep on top of this. First example is Adobe Acrobat Reader. You'll notice we use folks at reader. That's because within its lots and seeing, if you check the terms and conditions, it has some language around automation, which is highlighted right here, around customer Muslim install access either directly through recommends data or instructions. And an X1 four operations no, initiated by an individual user. For example, automated server processing, which is pretty much what we're doing automation. And if that isn't enough, there's actually a form post asking, is it possible to use Acrobat or RPI? And an Adobe staff member, realizing it's gotten diving employee here, that it's not permitted according to the Acrobat Ula. And getting a license to use Adobe for automation is usually done directly with them. Or an organization will have a team who manages license of the vendors. And it's not shape at all. That's why we use Fox at reader, which is free for the basic version. And it doesn't have anything in the licensing around automation. Next big one is Microsoft Office. And I actually recently came out with documentation around RPA in specific. So painful to Google Microsoft Office RPI licensing. What it essentially does is it will explain how the robotic process automation impacts lots announcing napalm marks of customers. And pretty much has three types of scenarios. There's attended automation, where you have a combination of RPA and a user working together. So a bought my process something automatically and a user might put in some manual input as well. You have unattended automation where RPI does the whole task for you. And finally, without RPA, where a user does a whole task. This scenario here extract from the documentation. It's the best way to explain it in a, your scraping a website. And it has all the different scenarios that it could possibly made. So without RPI X, if the Menil uses scan societal screen to capture content with unattended update. There's a macro that runs autonomously by scanning the website in the background completely. And finally, we've attended our API. There's a macro that allows the user to click a button and a specify content on screen is captured and its elevated. As you can see, there's a handy diagram at the bottom. And in a nutshell, for office, the specific laws and for IPA is unintended. Ipa and that's if you automatic office without a user having any input at all. At the time of recording. If a user does have input, There's no special licensing data. You can use your regular office through A65 glass. And so only one you need to be concerned about is unattended RPI. And Microsoft will have licensing details on the website around is. So that just wraps up lots and sin. It's just good to be aware of within an organization. Typically though already be contract setup with the vendors and attain who handles at licensing. You just need to be aware of that when you are developing automations around the impacts of using a particular product can have in regards to those licenses. 67. Course Wrapup: Congratulations on finishing this course. As you've seen, we automated many different sorts of systems and encountered challenges and resolved along the way. By now, you should have an idea of an automation you can make, whether or not that pay for personal use or use inside your workplace. The real power of RPI is being able to integrate two completely separate systems that wouldn't otherwise talk to each other. So what are the next steps on the journey beyond this course? You can look at getting qualified and you are hot. Subscribe to me on YouTube at CMA automation for more content to check out my other courses around in automation space. And if you have any ideas or any topics you want me to cover, Make sure it's paid back and review this course until next time. I'll see you later.