Example of the getUsernamePasswordX activity

getUsernamePasswordX in UiPath Studio

Hey, I’m Cameron Mackenzie at @cameronmcnz on Twitter, and I’m going to show you how to use the UiPath Studio, get username password activity (getUsernamePasswordX). So here’s how to log into a website using UiPath Studio, get username, password X activity, and also access this windows, credentials, credentials vault over here.

You can see, I’ve got a nice little username password application here. I got a little cheat on it. It says, Hey, there’s the username and password that will work. So if you kind of log in, you’ll get some details and some information in there. Um, if you go back to the page, it’ll log you out, by the way, that’s over at RPA certified.com/acme/index that HTML.

So if anybody wants to. File up and do this exercise yourself. You can, but let’s say I wanted to automate this. I wanted to do this using UiPath studio while the way I would do it is first. I would add an activity to open a browser to that U R L. And then of course, I want to type into this username and password field, the username and password, maybe.

UiPath getUsernamePasswordX Tutorial

A username and password pulled from windows credentials. So the easiest way to do that is while I’m in UiPath studio, but I’m going to use a studio X activity. So I’ve got show studio X selected there. And the one I’m going to use is called, uh, get username. Password X, there it is right there. I’m just going to drag this right into the Dumont, even maximize this page, just so that it’s a little easier to look at.

And I was going to say, what’s the credential that you want to use? Well, I don’t have a credential set up already, so I’m going to call it the UiPath. Example credential, and then I’ll throw a username and password in here. And what did we say? We said, Hey, mail@uipath.com is valid. And we also said, Hey, password will work as well.

So I’m going to throw those in there as well. You can show the password if you want, but now I’ve got this associated with this UiPath activity. When this runs, it’s actually going to take that username and password and store it in the credentials manager. In the future. If it runs again, it’ll pull it out of that credentials manager.

Okay. So now of course, we’ve got the save for later variable. I’m going to name that press what control K right there and give that the name credentials. That seems like a sensible name. And then of course, I’ve got this webpage open and let’s see if I’ve opened it up in Firefox. They just tend to like to use Firefox for development while from day-to-day stuff I use.

Um, I use it. And here we go. We can actually see this. Now that’s the whole thing over there in Firefox. I’m actually going to just do a, a little razzle-dazzle here so I can share the screen a little bit in order to get the next step going here. What I need to do is I need to say, I want to take that credential and I want to type the username in here and the password in there.

UiPath getUsernamePasswordX
Easily manage credentials with this UiPath getUsernamePasswordX example.

And so that’s just a matter of using the type into activities. The UI automation type into click over here. What do we want to type in there? Well, I’m going to select it into that field right there. I want to type in credentials dot usernames. Then that’s going to throw the username in. And of course the password is going to be exactly the same thing, except it’s going to be different.

And so I’ll indicate and screen the password there. And of course it’s not credentials dot username, but it’s credentials. Pop up a popup of a password. There it is right there. And of course, a log in, we want to click. So we’re going to have to add the click activity, click, click, click, and that’s going to be a mouse click on UI automation.

What are we going to click? We’re going to click this sign in button. And hopefully when this all runs, that will sign us into the website using our credential. That’s going to be saved over here. Now, notice I called this UiPath example credential. You do not see UI. Credential right there. Even if I flip back and forth, um, an oxygen look at that.

Usernames and Passwords in UiPath

It’s just been added in. I thought it wouldn’t add until runtime, but I just learned something myself. And there you go. Just as soon as I added in there, that credential is now stored permanently in windows, credentials, boy, UiPath studio surprises me how awesome it is. Okay. Well, let’s see this thing in action.

I’m going to close this browser window and let it start fresh. So I’m going to say let’s debug this application. Boom. Here it goes. Firefox of course wastes my time by installing some updates. I’m sorry about that. But now it’s going to open up Firefox in this Firefox browser window. I get this window that comes up that says, Hey, enter your credentials or accept the credentials that have already been stored.

If I update this, it will save it in the windows, credentials manager. It now clicks. Okay. It logs me in and I’m into the website and there you go. That’s how easy it is to use UiPath studio and a UiPath studio X activity to save a credential and subsequently use that credential, that username and password.

To a website. And again, if you want to use that website yourself, you can grab that form it’s over on RPA certified.com and there you go. That’s how easy it is to use the UiPath studio. Get username password activity. Now, if you enjoyed that tutorial, head over to the server side.com, we’ve got lots of great tutorials on UiPath dev ops enterprise software development.

In general, if you’re interested my personal antics, you can follow me on Twitter at Cameron MCN Z and subscribe on the YouTube.

Learn more about getUsernamePasswordX

If you’d like to go beyond this UiPath Workflow example, visit the UiPath Forum.

Discuss with Us on Twitter
Get UiPath Certified