UiPath Beginners Course [2021] - How to Learn RPA

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
my name is anna jensen let's learn some uipath this is the uipath beginners course i'm an rpa lead in my daily job and that means i can teach you these things with knowing what you need and what you don't need so there will be no nonsense here you will learn all the most relevant techniques go to anasyansin.org uipath beginners to find your course materials there'll be a zip file with the course materials in i'll have a site for each lesson that'll be the description of the case and some relevant files to download when you are done with the course you can click the next steps i'll try to keep this section dynamic that means that i will update constantly with all the new relevant videos and info here and remember there's no magic in uipath it's very easy just get started you will figure it out by the end of this course you will be an rpa developer let's get started let's install and set up uipath if at any point in this guide your installation process doesn't look like the one i make chances are that uipath themself has updated their installment procedure simply just click the video up here in the right corner or in the description where i will have updated the installation procedure but go to uipath.com and click try uipathfree choose either to author it or sign up with email put in your details i will put in mine confirm the license terms here and if you would like to receive some information well they sent out a lot of good information but i'll warn you they send you an email like five times a week so i'll just click sign up here i already got that this is my password manager i close it down now go to your mailbox and confirm your email i'll click here it will take you to the automation cloud where you can download uipath studio click that and in the left corner you'll see that we are downloading it uipath having downloaded the file simply just click it and the installation will start that's it click the don't show again and then click close now we just need to connect to orchestrator so in the right corner of your screen that's a little bit outside of mine but there is an icon called uipath assistant i'll drag it in here but simply just open it it's down where the clock is and we can sign in so click that sign in choose yes to open uipath and we are signed in and connect to orchestrator let's go back to the lessons now we simply just need to start up uipath and we are ready for our first robot so go to start shirts for uipath studio and open it it will look like this and we are ready to build our first robot we have installed uipath and now we are ready to create our first robot so click lesson2 your first robot scroll down to the description here we need to open a new project and then we'll create a robot that opens notepad type something in and click enter type another thing in then have a delay of 5 seconds click file click new window and then display a message box don't worry if you don't understand all this i'll show it all to you so you can create it so let's go to uipath to open up a brand new project and create automations in there on the new project click process here we can give it a name and since this is for our entire course we can just say our uipath beginners course but feel free to give it the name you want on the description it says blank process here it can say our course workflows and choose a location i just choose the default location but you can definitely change that then click create this is uipath as it looks when we open up we can first go to project down here so we click project here we can see our project the first one that is dependencies that is packages that is installed we can see excel mail system and ui automation this is default packages if we want to install more packages that could be if we want some pdf automation outlook automation or anything we go up here to manage packages then we click all packages and we can search for just as we want but we won't so we click cancel our project here the main workflow file is called main xaml and that's the only file with an automation in right now it's blank we can see it here if we open up main workflow we can see that we have a blank canvas and this is where we will create our automations let's try to go to activities and then just drag in a sequence a sequence is simply just a container for our automation as best practice we always want to give these activities that we drag in a proper name so here we could just call it our first robot simply just double click or right click and then click rename so now we have a container we have nothing in it we can't do anything let's look at the process description so we have this nice project and let's start at the end so we want to display a message box with a message in let's just copy this message over so mark it and copy then go back to uipath now we want to have a message box so search for a message box up here in activities make sure you are on the activities tab don't worry you will learn these things as we always almost always are in the activities tab scroll a little bit down and find message box then you can click it you can drag it in and now we dragged it into our sequence so our sequence was our container and this is our message box one thing to remember is that whenever you see these warnings something is wrong something is missing in here and when there's a inner warning that is in our inside activity here then this sequence all also display a warning because it says that there's something wrong in this sequence what's wrong here is that we'll need to specify a text for our message box and remember we copied that so simply just here in text must be quoted click here and then to place in a text put a quotation mark you'll see that it automatically put two quotation marks and then we can paste in the string so this one here now you actually created your first robot believe it or not we can run to run it go up here to debug file and click run file again click the drop down click run file this is just a robot with a message box that says our first robot is completed nothing special but you build your first automation congratulations with that is this video helping you then please give it a thumbs up that will really make me happy and improve my reach thank you and back to the course now let's build the workflow so we go back to our process description here we need to open up a notepad and then we need to type something in let's first open up a notepad to open up a notepad we go to activities up here and find an open application don't worry you will easily get all these activities within the next two hours so we drag in an open application and because we want the open application to run first we drag it in in the start of our sequence so the order is that we open up an application now and then we display a message box you can see the arrow here again that's fine we will fill something in to open up an application we could either just click here to indicate window on screen that is we can tell uipath that this is the application we want to open but then we need to have that application open so go down to your start menu then find a notepad simply just search for it then click it and here we have a blank notepad so what you do is that you click this blue here indicate window on screen and now you can see that the elements here they turn yellow and we want to not open this browser but we want to open up this notepad so whenever this yellow border is around your notepad simply just left click with your mouse like this and here we open up the application that's fine we could also if you go over here to properties and if this properties is not shown it looked like this you simply just click the properties here so we click it and make sure that we pin it because we will use it a lot so we could also have specified in the file name but it's usually more easy just to open the application and have uipath recognize it like this the selector that is the net windows framework address you don't have to worry a lot about it this just notice that we have a selector here that's it so now we can try to run it usually we when we are rpa developers we run these workflows a lot we see if it works and now it's not the most complicated solution i'll give you that but let's try it so click the drop down up here and then click run file that's it you see that we have opened up another instance of notepad that's because we haven't closed the first one and then the message box came up so click ok in the message box the robot will finish a message box will always pause the workflow so sometimes it's good when we want to pause the workflow to have a message box in it let me close down one of the notepads so when we want to automate in notepad we can see here that we have this open application and then we have something in it called a do that is simply just that we whatever activities we drag in here it will perform in the open application and let's see what we need to do so we go back to the process description so we need to type in this is our very first robot and then click enter and because now we know that we need the quotation marks so let's copy them so copy everything here and then go back to uipath to type something in we simply just search for a type into like this then we drag it in we need to indicate where we want to type in because we just opened the applications now i know that we can only type something in here but imagine that you have an application where there will be several places to type something in a system like sap or innovision then we need to specify it so we click here again indicate and here we can see that we can type in here we could also type in here that wouldn't make a lot of sense here we could type in here here we could choose all the elements but but choose the blank canvas here in the notepad click here that's it so now we need to type something in and remember we just copy that one so paste it in with the ctrl v like this so here we have this is our very first robot and then let's just fix some things so here we open up the application and remember i told you to always rename your activities right now it doesn't matter a whole lot but it will be best practice when we develop complicated workflows so simply just right click or double click then we can say open application delete this and maybe just say notepad like this here we will have it type into and then this editable text doesn't say a whole lot so we could try to delete it and then say something meaningful then we can say type into our first line maybe just make a description that you can easily interpret when you open up your robot later we can also right click here and then we can choose annotations add annotation so here we make a description to make it easier for ourselves or our fellow developers so we could say something like this is an annotation usually you didn't want to make an annotation to all your activities because this is pretty trivial we can see that we type into our first line and we can see what's going on but with some more complicated activities we want to give it an annotation again we can try to run the robot and let's see that it actually works so we will delete this or close it down rather and then run the robot so again click the drop down up here and then click run file we open up a notepad and we see that we typed in this is our very first robot then our message box came up that's fine we click the message box our robot is done let's go to the next step in the process description here we want to actually we want to click enter after this one and then we want to type in this is still our first robot so copy this one here it's very simple go back to ui path and then to make the enter i'll help you here because if we want to hit enter we can do it in several ways the easiest thing to send hotkeys is to just click this plus here you can see that we can send all sorts of hotkeys here but we want to find the enter that is here this this one you could of course also have use this shortcut here quotation marks hard brackets k enter but it's more easy just to click the plus so now we have our first line and then we click enter then we want to type something in into the next line so still have a type into and drag it in now we need to indicate it and i'll tell you why in a few seconds so click the indicate and now you can see we can't really find it sometimes this happened we could solve that in two ways we could first make sure that we have the notepad open and then we could do the indicator again to get away from here you simply just type in escape on your keyboard we get away so we could make sure that this is open and then we click indicate and we can see that we have it now another cool way that i want to show you is that click escape again simply just minimize the notepad so whenever you're here you might want to we all we already have clicked the indicate then you can click f2 on your keyboard and three seconds will go where you can do something and then the indicator will come back we'll use that a lot so f2 to make a delay with three seconds and then you can see this selection again with the yellow things here so now we want to type something in here that's fine and what do we want to type in we already copied that so ctrl v paste it in that's it so now we have two lines let's try to run it again so close down the notepad like this we won't save it we don't need it then we run the file we open up a notepad this is our very first robot this is still our first robot so far so good then we click ok so now we have a robot that could type something in it can send keystrokes it can open applications actually as well and we have a message box but we still miss something let's create the last steps in one sequence so we have a delay of five seconds then we click file new window and we already have this message box so go back to uipath the first thing that we need to do is that we need to have a delay and then we click file new window that's it so right after this type into we have our we can rename that as well so we can say type into our second line like this then we'll search for delay because now we want 5 seconds delay a delay is something that we use a lot as well sometimes we wait for applications to load web pages or something or simply just wait a few seconds to make sure that the system is stable here we simply just drag it in again delay you'll see that that's not something we can fill in like up here but that's because it's rpm properties that's the duration the duration is filled in when we say hours so we say zero zero that's zero hours no quotation marks here because it's time then we say colon we will then have to specify the minutes it will still be zero minutes then we'll have five seconds that's zero five let me repeat it we don't need quotation marks because it's the time we specify the hours the minutes and the seconds like this so this is five seconds so now we have our delay then we want to click somewhere to do that you find a click like this and drag in the click like here then we'll indicate what we want to click on so again click then we'll click file right and we can rename this so here we click file that's it now we just need to click there when when we have clicked file we need to click the new window right so that is simply just another click so drag it in we need to indicate it and now you can see we can't really do something because when we click here it will just be recognized as another file we're not we don't need to click the file twice that was not our mission it was not stated in the process description to make sure that we fixed this we could of course also always delete this and drag in another click but another cool way to do it is to click these three ribbons and then click indicate on screen this will let you reselect it and again we won't repeat the mistake and remember we had one cool way to make sure that we could click this file without selecting it that was the f2 so click f2 three seconds will go by click the file then wait and when you see these yellow ones we can now select the new window let me repeat that because this is important so we need to respec re-select this click item so we click these three ribbons we click indicate on screen then we'll click f2 like this we'll click the file and then we'll wait three seconds and now we can select it that was the new window we want to select like this so now we are done with our robot let me close down the notepad like this here we will just fix the description we will say new window again these descriptions they are not mandatory i'll recommend you to do it to get in a good habit of doing so because this is very important so now we should be done we can try to run it but let's first inspect it we open up a notepad then we type in a line of text we type in a second line we made it the layer five seconds then we click file we click new window and remember we had this nice f2 so we could have a delay of three seconds we use that here and then we have our message box let's try to run the robot so we click the drop down and then we click run file we open up notepad we type it in we have a delay of 5 seconds we click the file we click new window we see that we open up a new notepad and then the message box with the finished message came up congratulations you built your first robot you could follow a process description and you could actually do some very complicated things wasn't that easy let's go back to the lessons we'll go one back lesson 3 is about variables so click that listen here and then scroll down the description here we need to create some variables and do some operations within it i won't read this i'll just show you and you'll need to replicate me so again have your uipath open this was our previous project and to create a new sequence because this was our first automation i'm not sure that it's very smart to have the second automation in the end you could of course have it but let's create a new one to do so we can click the new up here and then we can choose sequence we could call it something like variables and then we'll click create so this one will be created in our project here we can see it we have our main that was the first robot and then we have the variables so this was the next sequence if you want an overview of what sequences that you have created we can go to project down here here you can see that we have our main and then we have our variables so it's as easy as that but let's create the variables workflow first we will have a right line that says something so simply just search for a right line like this and drag it in we want to type something in and what did we want to type in your name is and then your name so what we do here is that we'll type this one in here we go back to uipath then we'll put it in because it's a string that is text then we'll have the quotations marks around it like we did in our first robot so we do this and then i'll say anas put in your name like this now we click away and we can run it we run the file and you will notice that nothing really happen or you'll think that nothing happened but this right line we can go down to output and observe here it is your name is anas a right line we use that a lot when we develop these robots because it can type out their variables and you can type out their values and it's an easy way to see what's in it right now it's pretty easy to see it but now you know so we will to minimize this output again we can just click it again so click it open it click it again to hide it that's it but now let me introduce variables because if we easily want to have this name changed that could be to any other name we could create a variable for that the easiest thing to do is to go down to variables here we can see that we have a variable manager it's empty now but we can create it so we will call it str this is just a prefix that will describe the variable type as you see here because we are creating a string we will say str always with small letters and then we can give it a meaningful name i'll say name so the prefix that says something about the type and then the name is that says something meaningful about the content and here since it's a name that we want to create we call it str name the variable type we want to create a string but we could choose plenty of other variable types a string is simply just in quotation marks any kind of text it could be numbers as well the smart thing here is that we can use it for everything we cannot do calculations with it unless we do some operations so simply just store your text here always go with a string variable if you don't have a reason to it and that is usually when you want to make calculations then you won't do with the string the scope that is variables say that we have a sequence inside let me show you here like this and then we can choose that the variable was only defined inside the inner sequence so if we click the sequence scope here we can choose the sequence and that is that we can only use it in here it will get reset whenever we go past that sequence it's useful when we want to have a clean and nice workflow it's best practice but don't worry it will be on your advanced course so let's change the scope back to variables and move the right line out this was an advanced concept that i just want to show you so now because we want to use this variable up here so we will instead of this anas we will delete it make sure you still have the space like this that's it then we will to get a variable go outside the quotation marks and then it's have a plus and then this variable's name you can see that in this intellisense we can see it here sdr name that's this one you can choose it by double clicking but say that you don't have this drop down it could be really nice to have couldn't it you can just press control space that is control space you will have it choose the str name you can double click or tap it and now we can run it do remember that the default is empty so that will not be saying something let's try to run it here we can go to output and we can see that it's blank but let's fill something in say that i want to have anus like before are just in quotation marks type in anus down here in the variables manager i run the robot again like this we can go to output and we can see that our name is anus isn't that clever so we use the variable and now the smart thing come up because if i want to change this one here and have jenny for example i can run the robot again that's it we go to output and we can see that this has now changed to genu so a variable is simply just a container we use it a lot always use variables if you have things that could change because then it's easy to update another cool thing around it is that say that we want to use this name a lot in our workflow then we can just have this variable and if this one change value we don't we only have to change it down here in this variable manager so far so good so now you learned about string variables another type that is integer so let's create an integer create variable an integer that is just a whole number like one two three four five so i'll call this int then we can say our number like this in the variable type choose an integer like this and we can give it a default name we could for example say 912 and it was only the strings that need to be in quotation marks every other variables will simply just be typed out like this we can't really type this variable out because we are only allowed to type out strings so we will need to convert it to a string so if we go up here let me delete what we have already wrote like this then we'll say it our number press the tab to have it automatically filled in then we can say dot to string this dot to string is something that you'll use a lot because when we want to print things out we always go with the tostring now we can see it here we can run the file it will print out our 912 we can see it in here like that but say that we want to do a calculation with this integral that's something we usually do say we want to add something to it it's very easy to do what we'll do here is that we'll click the three dots up here like this let me maximize it you could of course edit it in here but to have a more larger view and a cleaner view click the three dots up here in the properties text because now before we convert it to a string we will do an operations with it so first have parentheses around your integer say that we want to add 5 to it we simply just say plus 5 like this we could also multiply it so multiply it with five let's do so then we'll click okay now let's run our robot and if we go down to output again you'll see that we have now multiplied with 5 isn't that clever but you might say anas i need some decimal numbers because all my database or excel sheets that's always in decimals sure no worries we can make an a double and a double is simply just a decimal number we can say dbl double and say our decimal number like this and then in the variable type we'll choose a double a wait we can't find it well there's a good reason for it we just click browse for types here you will see a lot of variables don't worry i'm not using all these i think i use like 10 variables in my daily job as an rpa developer so don't worry so simply just search for a double like this go down to the system that is ms corlip here 4.000 and choose this one then click ok like this so now we have a double and then we can simply just type in a variable and the decimal that is always a dot so if you come from a culture i live in denmark and here we use a comma for the decimal but be sure to make a dot as that is the notation we use in uipath so here i'll say 912.45 and we do the same thing as we do we did up here so in our right line we could either go directly in here or we can click the three dots here what we'll do here is that will inside the parentheses we can say dbl and now i don't want to write this out remember i can click control space to have this one showed up and because i wrote out dbl this variable is the only one that shows up so i just double click it and you could say that the parentheses they are redundant but i'll use it in a second so i'll let it be it never hurts so then i click ok now i will write out our double here so i click run file like this i go to output and here i can see my double that is a decimal but again we could choose to make all sorts of additions multiplications all that stuff to it but i think you get it it's the same way as with integers so now we covered strings integers and doubles another variable type that is booleans so if i create a boolean called bul condition like this and then on the variable type i'll choose boolean again you'll see that you find it up here boolean a boolean that is a variable type that can hold two variables it can either be true or false it's that easy if we are not specifying anything here in default it will be false so we can write that out exactly like we write out the numbers so if i go up here i can delete this then i can say bool condition like this then dot to string again we need the dot to string because it's not a string we can write it out here you will see that the value will be false like this we go to output and it's false we could easily change it either here in defaults by simply just writing out true then the value will now be true or we can do something else because it will be false as default but we can actually change that value here in the workflow we can do that within the sign so we drag it in the sign and here we'll first have on the left side we need to specify what value do we want to change and that was the bool condition so press ctrl space then find the bool condition that is here like this what value do we want to change it to well it's false down here but now we want to have it as true like this we can run the file again and now you'll see that we have a true here that's it it's that easy we could change all variables it's not conditioned to booleans it will also be possible to change strings integers doubles whatever that's it the boolean true false now our last variable type that is data tables that is a very exciting part and i need you to pay close attention because a data table it looks very boring but we will use it all the time when we do excel automations everything so learn this i'll delete this sign here like this and now we'll create a data table but we won't create it down here we could of course also create a new variable and then choose the type to be a data table but let's just not do it you'll see that we have a variable 1 here we can easily delete that by simply just right click and delete like that always delete variables you have no use for but over here in activities find a build data table like this drag it in you'll see that this is empty too in our data table wizard click that here you will see a data table a data table is simply nothing else than an excel sheet an excel sheet that exists only in the memory of our robot so what we do usually with a data table is that we convert our excel sheet into a data table to be able to do all sorts of advanced operations on it like this here there's a default value here i always delete it i'm not sure why they will have these defaults so delete everything so you only have the plus and this cross we'll need to have two columns and then two rows of data so click the plus here i'll just say the first column will be named id like this then i click the plus the second one could be name then i click ok it will be strings remember we use strings a lot unless we don't have a reason to even though that we work with numbers because that's the most easy thing to store that's the most easy thing to store variables then we need some data to fill in this could just be one go over to the name type in alpha now click enter and a new row comes up we'll say two can say beta like this so a simple data table it looks like your excel sheet with columns and rows then we click ok because this data table needs to have a variable name attached to it remember all these other variables had the values they had a name attached to it we also do it here we could of course create it down here or we can do something smarter so in the output data table click ctrl k and then you can call it a name i'll call it dt my first data table like this then i click enter when we press ctrl k over here in a variable field then it will automatically create our variable down here so it's a lot easier than to first fill in the name and then have to specify the type then we'll make sure that we don't make any mistakes because now we have chosen the data table say that i mistakenly created this one myself and choose an object now you'll see that we have an arrow oh oh so let me go back to data table and i created a new variable here in there very speed i clicked so delete it like this so our data table is now here we could do operations within it but let's just print it out to our right line to print out a data table we need a output data table like this drag it in two things we need to type in we need to have an input the input that is just the data table that we want to print out like this that will be the dt my first data table right and then we want to output it to a string so if we go up here we can press ctrl k and we can say str our dt like this you'll see that the variable will be created down here and now you think that will be not enough but actually this output data table is only the conversion from data table to a string so if we want to write it out we'll still need to use a right line so let me delete it here but because it's now a string we can simply just type in str our dt like this let's try to run it and let's just recap what actually happened here we built a data table we outputted it that is converted it from a data table to a string and then we wrote out that string so we run the robot again like this we go to output and here we can see that we have our data table it looks like an excel sheet that is the column headers and then we'll have the rows that's it so that was lesson two about variables let's go back to the lessons is this video helping you then please give it a thumbs up that will really make me happy and improve my reach thank you and back to the course lesson 4 is about if and while let's click that here we need to create a guessing game where we will assign a secret variable between 1 and 100 then we will ask the user to guess that number we will evaluate and tell the user if he or she was correct if not we will ask the user again to guess the number and we will give him a hint saying that if the low the number was too low or too high and then the game will eventually end if our user is a little bit smart let's create that in uipath so let's create a new sequence click the drop down here and sequence we can call this if while then click create first let us talk a little bit about what we are going to learn here so click the activities first we will have an if so go up here and search for an if and if is very easy so we drag the if in we already talked a little bit about it we talked about conditions and and if we'll evaluate a condition so for example here we can say 2 equals 2 i mean is this true yes so and if simply just evaluate a condition if it's true we go down here and do some activities else we do go here we don't have to have activities in both say that we only want to do it when this condition is true then we have the activities over here nothing here and the sequence will go on so we will have activities down here as well but let's say that we want to evaluate on something else that could be user input so we could take user input and then we can do something about it to take user input we will have an input dialog so search one input dialog and drag it in it's simply just a pop-up box asking for the user for an input we could call this guessing game because this is what we are going to create in quotation marks remember that then the input label here we could say something to the user so he or she will know what we're going to do this one could be in quotation mark input a number between 1 and 100 because this input dialog that will take some user input we store that user input in a variable so we could go over here to the output the result press ctrl k and it will always be a string variable that will be stored even though that we ask for a number so we need to convert that string to a number if we want to make calculations on it we'll do that later as we saw in the previous lesson so ctrl k over here and simply just say str user input then click enter we can go down to variables and we can see that we have created this string variable that's fine now we can evaluate on this user input so we can evaluate on the number that the user put in say that our number that the user have to guess is 65 then we can ask is the user input equals to and then quotation marks because it is a string up here so we need to have the 65 as a string as well so are these two numbers equal to each other then we can have a message box for the user so we can say message box find that over here and drag it in what we can do here is that we can simply in quotation marks we can say you guessed right like this now we can run the robot so we run the robot and first let us try to make a wrong guess here we will have the 45 or 455 so 485 we click ok nothing happen and that is because we take the user input here we say is the user input equals 65 no it's not then we end over here in the else and nothing really happens but if we guess 65 we will have this message box come up let's see that so here we can say 65 we guessed right that's right remember to always have a question that can be answered with true or false here and if otherwise it won't work now we will create the kissing game because we want to have our secret number that one will could be 65 or it could be anything but let's create a variable for that so we create an integer so we'll say int our secret number and we will have an integral for that here we will have a default value for it but you could create a solution where you assign it randomly i'll just say 89. remember it's not in quotation marks as it is an integer we will also need to convert this str user input that is a string to an integer so if we go in here we'll say int and then we'll say user input again it's an integer like this and this one will not have a default value because we'll have the user to give it to us like this and now we can do some clever things because we'll convert this string up here to an integer remember the user give us a string and we want to have it in an integer so we can compare it with our secret number it's not a problem if we just want to compare it like this but say that we need to know whether the number is higher or lower than the secret number then we will need to convert it to an integer so drag in an assign from over here like this what variable do we need to assign the value to well that was just our int user input we created that to collect the user input so in here we'll say int user input like this and over here we will convert this string to an integer so we will simply just say convert dot to it 32 like this parenthesis and then we'll have a value here we can type any string in or we could use the variable the string variable from up here so that is str user input so now we have converted this string to an integer i know i repeat myself a lot but that is just to make sure that we will learn it so here we can now ask is our user input lower than the correct guess so here i'll simply just say it user input that is the user guess is that lower than our secret number like this then we know that the user have guessed too low otherwise we have guessed too high so we can create two message boxes you can also copy activity so ctrl c ctrl v like this so here you guessed too low here you guessed too high like this so we can try to run it and remember our secret number here was 89 so if we run it again we can try to guess on 55 we'll click ok your guessed too low that's fine and likewise if we are higher we will have guests too high but actually what we want here is that we want to if this is the case if these two guys are not equal to each other then we know that the user haven't guessed the correct thing so we'll ask the user again so we'll ask the user over and over and over and over asking something over and over that can be done in a while loop its name while here but it is a loop if we simply just drag it in here after the initial question then we can ask are the two are these two guys not equal to each other then we will ask the user again and we'll have this if here inside otherwise we know that the user have guest right so we will not go in here so while loop again has this condition it will evaluate on it will go on forever let me show you so if the it user input is not equal to and not equal that is just like this it our secret number like this so this says are these two guys not equal to each other go in here and when this body in here is done we can drag activities in then we will look at the condition again are these two guys still not equal to each other we'll just perform it again beware that if this is never the case you have created an infinite loop this can run forever so account for that in your robots but now it's okay what do we want to do in here well we know that the user have guessed wrong because these two guys are not equal to each other then we'll have our if in so simply just take this if and drag it in it can be a little bit complicated but let's try to have a look we have this while loop here this ask has the user guessed wrong yes we'll simply just ask is the lower is the user input lower than the secret number yes over here no over here so what we will do is that we'll delete these two message boxes and then we will have another input dialog here in each of these things where we'll give the user some information so over in activities find two input dialogues and drag them in like this we'll simply just we could have copied it from up here so we'll simply just use the information that we have up here maybe not the input label but as a whole but let's copy it in here and here and remember if this was true then we were over here then we'll know that a user input was too low then we can say inside the quotation marks we can say you are guess was too low and likewise we can say over here your guess was too high like this again we will need to assign it to a variable and remember because we'll ask the user for this input again here that will be stored in a string so here again we will have here we will just not say ctrl k this time because we already have a variable for that input and that is just the sdr user input like this then we can go over here instead of doing it up here we can simply just type it in here as well it's just a matter of preferences like this so again we will take this string and convert it to an integer so we can compare it up here otherwise we will use the old value from the user input we got up here so we need to convert this input and as you see here we will use it on both then we can just drag it outside the if just outside here so the if will go on then these two things will happen and just outside if we will convert the number so we'll take this assigned copy it and then outside if we'll put it in like this so now this one will run for ever until the user have guessed right that means that we will not pass this while loop until the user has guessed right so if he's really bad at this casing game this robot will go on forever but let's say that he's good then we'll just need a message box down here so drag in the message box here we will say [Music] congratulations you won like this so shouldn't we try it and remember we put it 89 here but the user won't know so let's try it i'll just say 50 then i'll click ok your guess was too low then i'll say 75 my guess was still too low 85. well 95 my now my guess was too high i'll say 89 that's it we won so you have built a guessing game and without knowing we actually came a lot around this is very advanced stuff so make sure you got a good grip on this i'm sure you have the while and the if that's it let's go back to the lessons lesson 5 excel and data tables this is probably the most important lesson as we use excel and data tables a lot first let me briefly introduce it excel we obviously have a lot of data in when we want to work with that data in uipath we convert the excel sheets to data tables do all the operations with it and then we write it back to excel why do we do that that's because we have the most options within the data table set let us look at our mission so we click the excel in data tables and then we have the description we need to read an excel sheet we will calculate the totals column and then we will place a yes in the big order but let's look at the files it will be more easy to understand so i'll close this one down if you haven't download the course files make sure you do that and then in the excel and data tables folder we choose the orders and open it here and this is just a simple order sheet do note that our sheet is named orders we have six columns order id name quantity price total and big order that's the headers then we have four data rows with data in what we want to accomplish here is that we want to fill in the total column for each one of these items what we do here is simply just multiply the quantity with the price and then have the total so we'll need to do a little calculation here and then if this total is bigger than 10 then we will place in a yes here and it will be a yes down here but we want our robot to do it as we could have like maybe 200 thousands rows and i'm not the one sitting here doing it manually so that's it so keep in mind that when we want to automate we are looking at the sheep or sheet orders and then in the total column and the big order column and we have the quantity and price that's how we calculate total so let me close down the excel sheet and go to uipath i won't save anything that's fine i go to uipath then we'll create a new sequence so sequence i'll just say excel and dt then i'll click create so as i told you we want to read this excel sheet into a data table so over in activities find an excel application scope and drag it in here here we need a workbook path and the workbook path that is just simply just the windows address of this sheet so wherever you place the course files say shift right click copy as path and go in here we can of course always just paste it in here now you have the address but the elegant solution is to create a variable for it because if we build workflows and these guys they change often we develop on one computer and then move to another computer or a server then this one will not be correct so let's make it variable so we go down here because then we can just change it here in the variable so here i'll just call it str excel path it is a string that's fine over here in the default value i'll paste in the path like this because now instead of hard coding in the entire address we just type in the variable like this so here we read it you can see that we have some settings over here the one thing that i'll almost never use is the visible we don't want visible calculation in the excel sheet that is if the robot runs we don't want to see all the calculations that's just a waste of time so now we have to find our excel path then it's time to do something we because you might think that we already read it here into a data table but that is not the case we will need to find a read range to do so here we have two we have the one on the excel and the one on the workbook the read range under excel is the one that we will use so drag it in and let me briefly explain the workbook if you somehow don't have excel installed on your computer you can simply just delete this excel application scope and just use the read range from down here without a scope around it and then just choose the workbook activities but we have an excel installed so we can use this one here we can set in the range these two quotation marks these two guys that will indicate that we'll take everything in our sheet that's fine but remember our sheet was not named sheet1 this is just a default value that might be the case sometimes but pay close attention to this our sheet was named orders so change it like this then over here we can define if our table have headers our sheet indeed have headers remember the price quantity and total and so on now we just need to convert it to a data table here so control k or not convert we need to read it into a data table so here we can just say dt let's call it dt fruit like this so we go down to variables and we can see that we have created a data table so far so good so now we can do operations within this data table what we need to do here is that we need to iterate to each row one by one and then do the calculations to do so we will have a for each row take this one here and drag it in what this does it takes for each row that is the row here up in this data table and remember this data table looks exactly like the excel sheet it has rows and columns as well so we read each row in dt fruit that is this one and now we can do something because we want to do a calculation and remember we worked with variables so this will be very easy for you simply just drag in and assign like this what we do here is that we want to for the current role remember we are iterating to row by row by row we want to assign a value to the total column what we do here is that we'll say row that is the current row that we are referring to dot then we will need to say what column do we need to target that is item then parentheses you'll see that it automatically makes a parenthesis end whenever we type in the first one then in quotation marks we'll just say total this is the column that we want to target for all the rows so we can write this if you want you can also use index number but as they can change it might be a little bit unstable but say you just want to target the fourth column then you'll say tree because it's zero indexed or you'll say the first column that is zero but this is unstable so try to use column names if you can we can that is total like this what value do we need to type in we need to multiply quantity with price so instead of we can do it here but it's very small so i'll open up the value up here what i want to do here is that i want to make the multiplication so and that is i want the cue and row then item parentheses quotation marks then i want quantity i always have a little bit of problem around doing so but in order to um calculate on it we need to convert it to a double because it might seems that we have numbers when we do this but it's always objects which we can use i know it sounds a little bit counterintuitive because you can see the numbers in excel sheet but when we read it from there they are objects so we need to convert it and we already did that remember so what we do here is that we'll say convert dot to double like this then we'll have a parenthesis around this and now we convert it to a double do remember that in the excel sheet we only have integers so we could have just converted to an integral because that's whole number but let's say that we got decimal numbers we accounted for that here so now we have the first one in double we simply just need to do the same thing with the price and because we are lazy we don't like manual work we copy this then we'll have a multiplication sign we'll paste it in again and then we'll just need to fix the quantity so this one here that will work but here we we have it we have it as doubles but we want to write it in so we will write it in as a string so make a parenthesis around it like this now we are writing it in but we are only writing it to the data table but because that is the dt fruit we are not touching the excel yet and again and a data table only exists in the memory that's why when our robot runs so make sure we save it to the excel sheet otherwise nothing will happen so what we want to do is that we will make all these calculations and then after this for each row we can write the excel sheet we could of course also do it after each transaction here the assign but that's a little bit element so just do it here it will make your robot faster what we want to do is find a right range that's here choose the one from excel and drag it in make sure you are outside for each row but still here in the excel application scope that's it what sheet do we want to write to i will just update my order sheet but sometimes we want to read from one sheet and then paste the results to another c to make sure that we won't overwrite anything but we will just do it here orders and where we will start that is a1 i usually just delete everything here in the range unless i need to use it right now it doesn't do anything different but as always just delete it unless you want to target a specific starting range so if we for example put b1 here it will start in b1 then the data table that is dt fruit one last thing is to add headers now we can run it so let us run like this let's inspect our excel sheet here and we can see that we have now calculated the total column then we just need to ask if this total column here is this bigger than 10 then we'll have a yes in big order but let's delete this so we can see that everything works so delete the total column save and close let's do the last part of the robot because we can do it right here so we already updated the total column now we just need to ask a question is the total column bigger than 10 what can we use here i'll give you two seconds to think about it yeah as some of you might have guessed we can use an if so dragon if here we will say row item and then parentheses quotation marks total remember that was the row that we just and run column that we just updated up here we can ask a question always ask a question that can be answered by true or false in an if so here we will say is this one bigger than 10 but again this is an object we take from the data table we need to convert it to something that we can calculate on so we will convert it to a double again convert dot to double like this parentheses rounded like this so now we convert this object to a double and then we will simply just ask is this one bigger than 10 yes or no true or false if it's true we go over here if it's false we go over here it's only whenever it's bigger than 10 we want to do something and that is update the big order so again drag in and assign and here we will just say row item parentheses quotation marks big order like this and what do we want to update it that is just a simple yes so quotation marks yes like this and we will write it out here again so that's it that's how easy it is to work with excel in uipath but do remember we use data tables always data tables they look like excel rows and columns but we just operate there and always remember to write out the data table back to your excel sheet that's it let's run the robot like here let's inspect our data as they are yeah here we have the total column that's fine and we have a big order because this one is greater than 10 and a big order here that's fine that's how you do excel and data tables in uipath let's go back to the lessons applications and selectors we often work with applications with uipath so let's get started click the applications and select us our mission today is simple we want to take some user input that is in an integer format then we want to open up the windows calculator we want to multiply the input with 8 and then present it in a message box it might seem a little bit too simple but this will cover a lot of the struggles that we do when we automate in applications and you can just do more advanced application automations after this lessons let's get started so we go to uipath then we click new sequence and here we can call it applications then click create like here the first thing that i want to do is to open up the calculator and remember we could use an open application here and drag it in like this we could give it a name maybe if we want it i can say open application [Music] calculator like this then we could either specify the file name or we could indicate it if it's open it's not but let's open it so go down to start and then search for calculator or if you got your local language search for that but in english it's called calculator here let me drag it in i simply just click indicate and then we can see here i can choose this calculator that's the application that i want to open that's fine let me close it again and let's run it this one will of course also only open up the calculator and we can see that it's done here to do operations on it let's just click create a static solution that's just we assume that the user clicked five then we just need to click so we'll open activities we'll find a click so we'll have a click we'll indicate where we wanna click we'll say five we'll change this to be a dynamic input later on click button five that's fine then we wanna have a plus so another click in click indicate click the plus and finally the second number so here click indicate and we want to multiply it with eight so choose eight now we just need an equal sign so drag this one here and this one corresponds to let's say that you want to automate in division or sub this will be the approach so we'll click indicate and then the equal sign so now we created a solution that open up the application calculator and do some things in it that's it let us close this one and let's try it again so we'll run the automation 5 plus 8 equals 13. that's fine but we didn't want to have the 5s input as a static input we want to have some user input we already covered that so we know that we are going to use an input dialog drag this guy in so an input dialog that is put in an integer between here and here we'll just say type in an integer between one and nine or actually you can do it between zero and nine because that's the buttons that we have on our calculator then we want to store this in a variable and remember this is a string variable so go down here press ctrl k and we can call it str user input like this so now we store it and because these guys here we want to not have this five click we want to have it dynamic that is if the user types in seven we want the calculator to click 7 and this is a string and the address that we use for this number here is also in a string format we can see the variable down here sdi user input a string what we will do is now that we will go a little bit more advanced is that each one of these activities whenever we work in the ui that is the user interface then this will have an address so click the three ribbons here then click edit the selector a selector is simply just the address of this activity in the windows framework so uipath will know where it should click and here we can see you don't have to understand all this but the important part is is the static part because we can see here number five button and then we can see a name here usually you'll just have to try a little bit so what i do is that i now remove this name five because i know it will work as well and then here we can see that this five here we don't want it to be always type in five we want it to be dependent of the user input so mark the 5 here like this then right click and here we can choose the variable that we just created up here so we choose variable and we can see that we have a list of the variables that we can choose from i will just choose this one and then click ok and now we have made a dynamic input so whatever we type in up here we will get here but do know that it will only work with numbers between zero and nine we cannot click on anything else on this calculator so then we click ok let's try it so i will close this one here again and then we'll try our automation like this i will have number four that's how i like it i click ok we open up the calculator and now we type in four plus eight that's twelve isn't that clever you now created a dynamic solution we could change this one here so instead of click button five we could say click dynamic button like this so now what we need to do is that we need to get the result and present it in a message box that's fine what we can do here is that we can we have the result here what we can do is that we can send some hotkeys to here that is we can mark this we can copy it to the clipboard let's do that so here we will choose a send hotkey a send hotkey is simply just whenever we want to send keys anywhere in the windows framework right now it will be in our application but we could be anywhere so we'll drag in the send heart key again we need to indicate where do we want to send it i click here i want to send it in here and instead of this send heart key text displays 12 i want to send ctrl a because what this does that is a shortcut to mark everything so control plus a this is just a description by the way we will choose it down here so i'll say control and then over in key i simply just type in an a we could also choose from all the predefined keys but we will use the a like this now one thing that we will need to investigate click the three ribbons here and again edit the selector because you can see here that this is a static selector as well we can see that we have this not so nice 12 in the address and that means that uipath can only send this hotkey whenever the display says display is 12th and that is by the way a title a hidden title of this so we need to do something about it what we can do when we work with selectors is replace the static part within the stairs so now it will work we can would work with any number we can validate it and we can see that it still works here it will work whenever we say 33 up here we can just try it so if i say plus 8 then it's 20 and we can click value date here and our selector still works so we make it dynamic this is some of the things that you need to do you need to make the selector's dynamic a lot but that will be very easy if this doesn't work it will just come up in an arrow and you know how to fix it now so then we'll say okay so now we have market so we marked this one here then we just need to copy it so we'll send in another hotkey we'll send in ctrl c that is copy so i'll indicate where do i want to copy from i want to copy from here like that then i'll say ctrl c and let's just give this a better description ctrl plus c like this so now we copied it and again what do you think we need to do click the three ribbons click to edit the selector and change the address because we could have a lot of numbers here so in the stairs validate and we can see that it still works then we'll click ok now we got just need to get the message we copied to the clipboard that is the result we need to get that and we have an activity for that so we will choose a get from clipboard like here and drag it in this simply just get whatever that is in the clipboard and store it into a variable it will be of the type string so go over here to output in the properties press ctrl k str result like this but now we have it in the string and we need to present the result to a user so what i do here is that i'll find a message box like this and drag it in and let's just present the result in raw form that is the str result should we see if it works let me close down the calculator let me run the file type in the number well i will type in 7 this time open up the calculator 7 plus 8 equals 15 and we will have our message box with the result isn't that clever you learned a lot in this lesson we just need to do one thing that is just to close this calculator so find a close application like this and drag it in right after the message box and the message box will pause your workflow so this close application will only perform whenever we click ok in the message box then we will close the application so we click indicate what application do we need to close that is the calculator like this that's it let's try to run it again and see that our entire workflow will work so i run the robot let's have three this time three plus eight that's eleven we have eleven in our message box when we click ok this application will close so we click ok and the application closed that's it that's how easy it is to work in applications in uipath let's go back to the lessons browsers we often want to automate in browsers so click the browsers lesson here we will need to open up a browser with this url then we need to do a login and this is just a test page but it could be any web page it will be the same activities that we want to use the login is here tom smith so we use that one and we use the super secret password like this and then we click login here we have the secure area and if we look we need to take a screenshot of that secure area that's it so let's create that in uipath let me close down this one here and only have the lessons open so i go to uipath and then i'll say new sequence i'll say browsers the first thing that i'll need to do is to open up a browser so open browser here and drag it in i'll need to use a url and the url it was just this one here so i'll right click in the lesson and i click copy link address go back to ui path as you now know we don't use hard coded in here we use a variable so we go down to variable say str url then in the default i'll put in quotation marks and i'll paste in the address go down to the url field i'll say str url now we are using the value of this variable and we'll open up a browser let's see how that is happening so i run the file like here we will open up a browser and that will be internet explorer that is because internet explorer is default and there's a good reason for that internet explorer is often installed on all servers and we cannot be sure that chrome ills or firefox for that matter so right now we installed that we open up internet explorer so we can go up here to the browser type then we can say chrome now we will open up the address in chrome so let me run the robot again this is the internet explorer here you can see that oh you couldn't see that but we have it opened here in the air chrome let me close down this one and let me close down the internet explorer because now we opened up the browser then we just in quotation marks need to log in so let me actually run it again because i need to have it open so i need to know where i can log in i've got of course also have typed in the address but it's more easy to simply just have the robot doing so because now i will need to have this username so i'll go back to uipath and yes you have guessed it right we create variables so str user like here in quotation marks paste in the user we can also create a password sdr path then go back to the browser to get the password that is here like this back again to uipath quotation marks paste it in so to do the log in we will simply just do a type into so in activities find a type into and drag it in we will have one for the user and one for the password we'll indicate where we want to type in the user that will be in this box you can see the yellow ones around it here what do we want to type in well we have a variable for that now str user we can also do it here in the password sdr pass remember we call it that so str pass we'll create these two exactly the same way here we can have the type into input password input username well that's fine for now you could argue that you might want to change the name i'll leave that up to you so now we have fill in these two things we want to click the login like here drag and click indicate where we want to click i want to click the login well it doesn't matter if you click the whole button not just in here it's this is a sub element of this but i'll just take the big one like this so now here you can change it to click login like this this one will log us in to the area we can try to run it so let me close down the google chrome with the internet login on and run the robot so i run the robot it's here we can see that we now type in the username the password we click login and what you didn't see was that we are in the secure area now we just need to take a screenshot of this area and where do we want to place the screenshot well go to our lesson folder where you downloaded your files click in it let's make a new folder here just right click save browser like this and shift right click on this folder copy as path because we'll need to know where the screenshot should be placed so we go back to ui path now after we click logged in find a take screenshot here and simply just drag it in we need to say where do we want to make the screenshot and let me have it here we want to have the screenshot in this browser so we simply just indicate it and what do we want to have a screenshot of well let's just take the whole browser like this so now we take a screenshot and let us change this as we know this is best practice so we'll say login area like this so now we have the screenshot and we will store it into a variable so go over to the output and here you might not know what kind of variable this is it might be easy when we have the data tables you know that it was data table when we work with that but here well no clue then do the easy thing just press ctrl k and we can just call it screenshot here we don't have a prefix yet because we don't know what kind of variable it is so i'll just click create then we can go down to variables we can see our screenshot here and we can see that it is of the type image well then we simply just add the prefix from here emg screenshot isn't that clever so now we created this variable and we stored in the screenshot in it then we need to save it to our folder so i will go over here and find a save image like here and drag it in we'll need an image that was this variable from up here it was called img screenshot so we type that in here and then we want the file name the file name well we make a variable for our folder first that was the one we copied from out here so we click down here create variable str folder this is of the kind string we go over here and simply just paste it in this was our main folder so what we do here is that we can now say str folder but we also need to give it a name and to do so we'll say plus this one is good it will teach you to work with folders and files as well quotation marks then a backward slash we can just call it screenshot and then png like this so this one will work or that might be a little challenging here for you let's see so let me close down the internet browser again the chrome and run it here we login click login like this the robot finished let's look at our screenshot so we go into the browser take the screenshot and we have this if by some way you could have a screenshot where you're still at your login screen and that is because what's happening here is that we click log in and then we take the screenshot so you might want to have a little bit of delay here that's how we sometimes need to use a little workaround so that's it i will ask you for one favor will you give me feedback here in the comment section that is below the video you're just watching simply just type in comment with your maybe your name and then some feedback for the course it will help me in getting better at making courses but it will also improve my reads and that is always good because then i can make more courses i will have more time for that so let's do that and what you'll do here is that we'll create a variable for the feedback again you don't need to post it then we'll just create the flow without clicking enter so you're not posting anything but we'll say str feedback and then simply just type in your feedback here in quotation marks that could be hey alice well this is anas from denmark i think your course is great but please fix your rooms i'm not shy so give me anything any feedback you can think of of course i also like the good ones then i'll say kind regards anas what we need to do here that we will need to send this feedback to the comment section because we are working here in a browser so let me minimize this here we have it we don't need this anymore we created that so we just right click here we disable the activity and again minimize it so now we want to make a comment to the comment section here to the videos that you are watching that is here and we just need to because the browser is open you're watching the video i know that otherwise you couldn't hear me now then we just need to attach that browser so we'll find a attach browser here and drag it in either below or in front that doesn't matter then we indicate the browser that is this browser here and now we can do some operations in it we want to type in the feedback again we just don't click enter if you're not comfortable in typing in this thing there's no pressure from here i'm happy that you're just watching this video then we click indicate we'll indicate this comment section like this maybe give it a better name so i'll say comment and then put in the feedback that we just made but there's a built-in challenge here so if i press ctrl space we can't find the feedback variable well that's something you often see that is because you defined it in another scope and then it's not visible here it's gone well it's not gone we just need to change the scope so we find it we created it in here in the open browser then in this do now we can go down to variables and it's here but it's only defined in this scope and we need to use it in the other scope so simply just take the browsers like this and then close down the variable manager again collapse this and now we can choose it from here str feedback like this and to post it again don't do it if you don't want to there's no pressure from here but to post it we need a click activity so click like here then we go back here and what do we want to click we want to click the comment button but we can't right now because it's gray out but whenever we write we can click it so write something then click indicate and indicate the comment one like this now there's one challenge and this is one was a great thing that i can show you now because there's something in it or at least right now and that could be a workflow where we have something in the field then we can simply just go to properties and click empty field this one will empty the field let's try to run the robot so now we will empty the field and then we will type in the feedback and then click comment like this if we go back to our browser we have now posted feedback to the video thanks a lot if you did this and thanks a lot if you're just watching it that's it let's go back to our lessons file handling now you are actually almost an advanced rpa developer so let's learn how to handle files the process is simple we want to create a robot that will create two folders then take a look at files and sort these files into these two folders finally make a log count well our files that was in the files here so if we open up that let me close down this one from the previous lesson so in the sort files folder we have three excel files and four word files that's fine we want to sort them first let me go one back let me shift right click to this folder copies path you know the drill then we go back to ui path we create a new sequence for the file handling so we'll say file handling then we'll click create like this first thing that we will need to do is that we'll need to create a variable for that folder str folder we can call it then we simply just paste in the value over here like this let's get started we want to create the two folders remember that in the sort files we want these ones to go in an excel folder and these ones to go in a word folder so to do so we will find a create folder here drag it in we will need two so drag in two the full path of it let's create the excel one first that is just the str folder that is the main directory then we want to specify what name will our folder hold so we'll say plus then quotation mark then we can type something in we'll say backwards class as xlsx sorry like this this one will create this folder then we similarly can create this below folder that is just docx that is for the word ones let's see that in action so we'll run the robot like this we can go out to our directory and we have now created two folders that our files can go in but let's just delete those because we'll create it when we run the robot finally that's it so we go back to ui path now we need to gather all these file names including their path so that we can sort them or actually we can look at them and then sort them so to do so we will have a for each remember this is for each not a for each row so dragging it for each then we will say for each item we can rename this this name is just for your convenience so call it whatever you want we call it file here because we are actually looking at files then we can apply the net method we can say directory like this then we'll say get files that's the method get files and then we want to tell uipath or actually it's visual basic what files we want to get and that is simply just the files here in this folder so we'll say parentheses and then we will use that variable control space if you can't remember it and simply just tap your way around it so see now we have good use of our available we already put it in three places so now we get all these files let's just see how that looks because this is just the strings that we are getting in so if we take a bright line and then write it out so we will write out each file here to do so we will need to change the type argument to a string because it will be in the string format and then we can just say file here like this so what we do now is that we create the folders and then in the right line that is in the output console we will get the file names so let's go back to the output and we can see here there you go there are our file names including their path so far so good let us go out here you can delete it again nothing happens it will just overwrite but we want to see that a robot works so now we have the files we can delete this so we take each file name that's what's happening here before we wrote it out now we just need to look at it and say hey is this an excel file no well is this an a word file yes then we will just move the file correspondingly so what we do here is that we will have our old if in remember that that was very easy that was where we asked a question that could be answered with true or false so here i'll take a look at my file so i say file and then we can apply another dot net method that is the ends width like this what do we need to have it ends with we'll say parentheses then quotation marks and we'll say dot x l s x so if we do that then we know we're here similarly we can create it for the word one but let's just create the condition first because if it is an xlsx file we can move it to this xlx folder so what we do here is that we'll find a move file here and drag it in so what do we want to move we have this file up here so we'll say file like this where do we want to move to well we want to move to this one up here like this that will do it let's just try to run it just to see that the excel one at least work then we can copy it to the word ones and remember this is so easy there's no magic to it so let us go to the folder and we can see here that our excel documents they are gone they are in here that was what we wanted right let me copy it back delete the folders again and now we can just copy this if here we're still in the for each so we copy this one here simply just paste it in below then we'll change this one here to docx docx and we will change it down here as well to docx like this so this one will work for both of the file types now we just need to create a log what we want to do is that whenever we move a file here then we know we are in here in the then then we want to add one to an integer counter to the excel counter and here to a word counter we'll create two variables first so in the variables say create variable a and t int sorry that was danish xlsx and remember it should be an integer like this change the scope to file handling so we're sure we're outside there because we want to create a log in the end x d o c x like this that one will be an integer 2 and it will be in the file handling by default and integer is 0 so there's nothing in it that's fine we will just add to it whenever we move a file what we will do here is that we'll have two assigns we will have one assign here here so we will when we when we move this file here we know that we can add one to the counter and to add one to a counter we just say int as xlsx remember that is the xlx the excel files here that we actually adding to that counter so we'll say in xlsx it slsx plus one like this similarly we can create it down here that will will just be our docx counter so here it docx and we will add one to that whatever value that holds so this one will just keep updating whenever we move a file these two will go now we can create a log message we haven't done a log message before but it's actually the same as doing a writeline this is just a log message we will use that later in the advanced course so simply just choose we can choose an info this is just a log level that is how it will be assigned but it doesn't matter just take info then we can make a text quotation marks then we can say u sorted then a space and now we say plus because we want the excel files that is the int xlsx like this we want it to a string because right now it's an integer we can write it out and we also tried that before that was the two string remember i told you that you need to have this one in your mind we'll use it a lot then we'll say plus and this one was excel files so excel files and space this one will be a rather long sentence but that's okay we'll practice a lot of things that we learned and then we'll say int the darks to string then plus quotation marks space then we'll say word files dot then we'll say that's a total off space i know this is a little bit long but that's fine we'll practice our variables handling then we'll have a parenthesis because now we want to add these two integers together before we're converting them into a string so we'll say it slsx plus it dark then to string and finally we could have a plus quotation marks space files like this that's it now we created our workflow that will sort our files and do a lock for us so we'll click run and we can see that we have sorted three excel files and seven word files well something is definitely wrong here we can see that we have the total that's 10 and here i actually did make a mistake in the coding but i do that all the time every day as an rpa developer i made these things that was just nothing on purpose but we can see that we actually we put it out here and that is for each file we added one to the docs but we should drag it in here like this but it's really good to see you will need to solve a lot of these puzzles when things not working as expected and do remember to pay attention to the details because if we just gave this to our customers we will have created a faulty robot and of course this wasn't a whole lot but we will have to we could make bigger mistakes but let me copy these ones out and then we will inspect that the robot will work so we'll delete this like here we can go down to our output and we have sorted three excel files and four word files that's a total of seven files so far so good so this was a good exercise in file handling but also in debugging your own workflows well something was wrong here and we could easily see what was wrong let's go back to the lessons hey guys the moment i think a lot of you were waiting for that is the data scraping moment because now we will learn to data scrape and the good news is that we already have been a lot of the components for that so this will be very easy for you just do the operations with me but let's click the lessons we want to read an excel file and that is in our course files so i'll go in here i'll say data scraping it's called balance i want to do amazon searches for each one of these four topics and remember the sheet is named topics then i want to data scrape the results i want to status scrape the title the url the alter the price and write it back to separate sheets for each topics well sounds easy doesn't it maybe not whole but just do it with me pause the video if it's too much or if it's too fast rather so what we do is that we go back to ui path and then instead of file handling we'll make a new sequence we will say data scraping like this and click create so what i want to do first is simply just to open up a browser and navigate to amazon so i'll find a open browser here and drag it in let's make a variable again as we are used to str url then in the default put in two quotation marks then we'll say http s then colon two forward slashes amazon.com we can close down the variables manager and up here put in the variable str url choose the browser type to be chrome and we can see if it works like here there you go we go to amazon what we need to do now is to search for topics like excel then scrape all these results not only on the first page but as on as many pages as we have as we have results so let me go back to amazon again just to the front page because sometimes there can be something with the selectors so we go to the front page like this so what we want to do is that we want to open up the excel sheet read the topics do searches for each one of these topics and data scrape based around it let's see how data scraping works before we do all these things because that's the very cool thing and the good news is that we have a data scraping wizard here we can select the values and let's say that we have done a search on for example vb.net then we'll select the first value that will be of my title so i click next here i choose the title that's fine then i need to show you i part the second element because then it can figure out their pattern so now i have chose the first title the second title and we can see that all the titles are painted yellow that was what we wanted we also want the urls corresponding to these items you can see it if i move it a little bit up those urls here down in the lower left corner we want to have those as well so the extract url give it a better name url we can call this title as that's what they are then we click next here you have it we have both the title and the url for all the items that is only on the first page and we want a little bit more because remember we wanted the orders and we wanted the price so let's extract some correlated data so now we want to extract the order and price so click extract correlated data simply just choose this entire author line and we do it because one some of the books can have more authors we want to have that scraped so i choose this one i know i have to buy with but we can easily just do some data operations on it then i click next and i take this line here as well this one you can see we get all the orders not just the first one and we can call this one author we don't need the url here because we already scraped that so we click next and we can see our preview here we have title url and author one thing that we want to fix is that we want as many results as we can have not only 100 so we just say zero for all now we just need the price so i say extract correlated data here well we need the entire price so be sure to mark it with the dollar sign otherwise we cannot mark these two things together if we do that we just do this so now we have the price as well that's this one then we click next here you go of course this doesn't look all that good but it's easily fixed with some data table functions so then we click finish now we have scrape but we want it on this side but remember one res one result one side with results could have more pages we want to have all pages on well that's easy and new ipad just click finish is data spanning multiple pages yes it is that was our mission so click yes and then you just need to tell uipath where the next button is that's here that's it now we scraped all the results from one side we have it in here and it's scraped to a data table variable the first thing that i want to do is to rename it so it fits our standard so instead of this notation i'll say dt and i'll say scraped like this now we can create the flow so it will match all our topics not only one topic what we need to do here is first have an excel application scope like here and drag it in we will have a workbook path that is the excel path that we run a read and remember we haven't created that variable yet so go out to your excel sheet called bounce shift right click copy as path back to ui path so we'll say str excel path like this then paste it in over here like this up here in the workbook path simply just say str excel path like this close down the variables manager untick the visible we don't want visible excel now we have this we can read the range still make sure you are under the excel activities so read range this one will read the sheet into a data table the sheet is named topics so be sure to do like this that's fine we'll output it to a data table so i'll say ctrl k dt topics it's simply just one table you know remember it was one column with four topics but this could be huge it could be a thousand topics like this so now we read it we can iterate through each topic do an amazon search and then scrape the results so let's have the open browser drag it inside the applications excel application scope then it'll be easier in the end you'll watch so now i want to open the browser it opens up the amazon page like this it's here remember that it doesn't look like this it will look like this let me just be 100 sure that we are on the right page so it will look like this then we will do a search here and we will click here so what are we going to do well we need to type into something so i will have a type into but before i can do that i need to have something to type in and that will be the result from the data table and how do we do that well we found that one out in the excel one we'll have a for each row so now we are simply just iterating through each one of the rows in the data table that's where the topic is so we'll say for each row and then we'll do the thing so for each row in dt topics like this then we will have a type into here drag it in and indicate where we want to type in so we want to type something in here again this one should be renamed because that is horrible to look at so type into search like here what do we want to type in we want to type in the term that we have in our data table so that is simply just the cue and row remember your excel skills from here we are referring to the q and row with row then item that is column parentheses and then we'll say topic because it's an excel object we will have it to a string like this so now we did a search but that's just not the whole thing we also need to click search because if i just type in let's say vb.net nothing will happen i need to click search here so let's find a click activity like here and drag it in so then i click click here like this we can have this one click search like this because when we did that we are now doing this then we get the results now we can data scrape and to be sure that we have nothing in here if we done a previous search we do two things always when we start all over from the search make sure you're on the same page every time so you know that your workflow will perform the same way every time not only here in the browsers but everywhere what we can do here is always to have a navigate to start in each one of our for each row if that is necessary here we'll just say we'll just go to str amazon again i know in the first instance we will go to the amazon go to amazon again but after we've done the search we want to get to the blank first page and do a search we can also if there's a cache in amazon we can have these empty field put on too now we click search we can do our data scraping because we got the result here so what we will do here is that we will simply just take this data scrape from our datascape wizard copy it put it up here like this and here you will see that this variable is simply not defined and that is because we now change the scope so go back here to this first scraped one go down to variables in the dt script simply just change the scope to the outer data scraping like this and now you will see that we have no arrow up here then we can delete this one down here we don't need it we already have the data scraping in here so now with data scraped to dt scraped and because each time we do a search here with data scrape we want to have it written out to our excel sheet otherwise this data table will just be written over and over and then if we put it the excel sheet here only the last result will come up so what we will do here is that we will find a right range like this on the one under excel drag it in where do we want to write to remember we want to write out to a new sheet with the name of the topic so not sheet1 and how do we get the name of the current topic well we actually have it up here so simply just take this one here and in this sheet just put in this we are deleting this as best practice as well as add headers to our data scraper shells now we just need to add in this dt scraped and we're done let's see if this is not working and it's not working not only working it will work fine let's run the workflow we are running the workflow now opening up the browser performing our first search scrape the data remember that we have maybe seven or ten pages now we are scrolling through the pages getting all the results out it will probably take a little while just lean back with your cup of coffee and enjoy your awesome automation these books well some of them about vpnet are really awesome two of them in fact i'll put the link to the books below here in the description as well as i will have some other useful links now we're just waiting it will be writing out to the excel and then we are waiting for the next screening like here you can see that it took a little while that's okay it is a lot of results that we need to comprehend now it's power automate another cool automation product that i can recommend i made a beginner's tutorial it's free with your office package i can recommend you going checking that one out we'll search for excel and scrape the good results for excel excel is as i said a very nice way to deal with data it's important that you can do excel if you can do vba as well you are an accomplished rpa developer so specialize in these things i can recommend sq sql excel vba regex that is the most important ones and of course visual basic.net that's it we've done the data scraping let's go to excel and verify that we indeed have scraped out the results well it looks like we have we have the excel we have the power automate and we can see all these nice results going down here we have like 145 books here that's how easy it is to data scrape so you did it you completed this course but let's go back to the lessons because right now you're in a position where you are actually an advanced developer in terms of well the usual automation person in the business what you need to do now is practice practice practice practice i have this playlist with advanced automation uipath automation go through this it's ready to build use cases from the start to the end and if you enjoyed this video please give it a thumbs up that will really help me a lot well done you are now an rpa developer why not go for the advanced one so you can actually get a job with this it's very easy just spend a couple of hours take this playlist to the right where i'll teach you everything about uipath advanced use cases or take the playlist to the left where i will teach you re-framework which is another great way to learn uipath and to scale your robots
Info
Channel: Anders Jensen
Views: 48,107
Rating: 4.9770937 out of 5
Keywords: anders jensen, uipath, uipath guide, uipath how to, uipath tutorial, uipath tutorials, uipath beginner, rpa, robotic process automation, rpa tutorial for beginners, uipath tutorial for beginners, uipath rpa, rpa uipath, rpa uipath tutorial, rpa tutorial, uipath beginner tutorial, uipath beginners course, begin with uipath, start with uipath, how to start with rpa, how to start with uipath, robotics, automation, desktop automation, anders jensen uipath, uipath anders jensen
Id: sp5ZwFKfh-0
Channel Id: undefined
Length: 120min 35sec (7235 seconds)
Published: Sun Feb 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.