From the course: Complete Guide to UiPath RPA Development

Browser automation - Manual assembly - UiPath Tutorial

From the course: Complete Guide to UiPath RPA Development

Browser automation - Manual assembly

- [Narrator] In the previous video, we used the recorder to create this use automation browser activity with a series of steps that automated a task. In this video, I just want to quickly show you how we could do something similar without using the recorder. So I'll right-click on this and disable this one and collapse it. And now I'll click and drag my timeout variable above both of these activities. I'll right-click and enable this one and double-click on this sequence to rename this one as automate CRM steps as well and hit Return. Now in order to do this, I've got to make sure my Chrome window is open and on that initial landing page. The reason I showed you how to use the recorder first is so that you can understand which activities UiPath would recommend to automate various steps. Notice it chose to use the click activity and the type into activity, and we've got type into and click again. Once we get down to this one, notice it used select item, and here it uses check. So if we want to do this in a more manual fashion, we need to remember click, type into, select item, check, and check again. Of course this one was GetText and this one was check app state. So let's go back up here and collapse this again. And the first thing we need in activities here is click. So under UI automation, I will click and drag my click into my sequence and it's saying indicate in the CRM automation. So when I click on that, I'll hover over this and click on it. Notice when we're doing this manually, I have a lot more control over which targeting method is used for any given element I want to interact with. In my project setting, you may recall that I specified that by default I want to capture a strict selector, fuzzy selector, and computer vision. In the moment here, I can make a choice to disable any of these things and only use one or two or whatever I want. And as I said before, these targeting methods are cascading. If my strict selector doesn't work, it'll try my fuzzy selector. And if that doesn't work, it'll fall back to using computer vision. It's telling me there was no anchor. And the anchor is simply some other element it's going to use as a reference to say, hey, click on or type into the thing that's next to this thing. So I notice it's offering me to click on some other element as an anchor. So that's what it's asking me right now is do you want to click on something and associate the anchor with this element? And I personally know that since this has an ID of SignIn, that's a very dependable thing and I don't need an anchor for this. So I'll go ahead and click on Confirm. Notice now I'm back in Studio. It shows me the screenshot and that activity has a title on it. So now I would either use this plus sign to add another activity or go into activities and choose my next activity. When I bring the web application back up, notice we're still sitting here on the homepage. The fact that I used the click activity did not advance my browser into the desired state for the next activity. So after I add this, I have to manually drive the browser to the next page. And now I can use my type into. So I'll go into activities and type type. And here we see under UI automation, type into. So I'll click and drag that under here. And now much like it did before, it's asking me, hey, click on the element you want to type into. So I'll click this button, I'll hover over email, and click on that. And now notice it's showing me the same things over here, my various selectors that I can check or uncheck or modify. I can hover and add an anchor if I want to. In this case, it makes sense to use this as an anchor because it's a nearby element that's very relevant to this text box. So if I click on that, I have chosen that as the anchor. And when I click on confirm, it takes me back to UiPath. And notice now I still have to type in my desired text right here on the activity itself. And of course, when I click on this, I have to remember to open my double quotes and type in admin@whatisrpa.com. And now I have to manually choose, do I want to empty the field before typing, yes or no, single line or multi-line or no, and do I want to click before typing? And again, all of these values that I can change here on the activity, I can also access over here in the properties panel. There's my text. Notice empty field before typing is here. And it's also important to realize that I could grab that timeout variable and I can place that into the timeout of each of these activities as I add them into my workflow. So I'm not going to go through this whole thing. I just wanted to show you how you can use the activities tab here and drag and drop these things in manually and build up your automation that way. Or like we did in the previous video, you can use the recorder to simply walk through the steps in the browser and allow it to capture those activities and advance the browser along in the process. So now your toolkit has two different options for how to build up your web browser automations. Control + S to save, and in the next section we'll talk about how to automate a desktop application.

Contents