How Do You Use UiPath Studio CE to Log into a Website?

Problem scenario
You want to test out UiPath's abilities to see how RPA works.  You want UiPath to automatically log into a website that challenges the human for a username and password.

Solution
Prerequisite #1
This assumes that UiPath Studio has been installed.  If you do not know how, see this posting.

Prerequisite #2 (specific to this example only)
For this example we will set up an automation to open a web browser, go to the rpaforum.net website and log in.  For this example, you will need credentials to log into the rpaforum.net.

For this example cookies cannot be blocked from rpaforum.net.  If you are using the typical, recommended settings of I.E., do the following:

1.  Open I.E.  If you are prompted, you may want to accept the recommended settings.

2.  Go to the gear icon in the upper righthand corner.  Go to "Internet Options."

3.  Go to Security tab and then click on "Trusted Sites."

4.  Click on the "Sites" button.

5.  Enter this text with no quotes "rpaforum.net" and click "Add".  

6.  Enter this text with no quotes "https://ajax.googleapis.com" and click "Add".

7.  Enter this text with no quotes "https://www.google-analytics.com" and click "Add".

(There are different ways of eliminating pop-ups for web UI automation purposes.  Adding the above as Trusted Sites allows you use maintain I.E.'s recommended security settings.)

Warning
This solution does not encrypt a saved password. This is acceptable as a proof-of-concept.  It is not advisable if the password used in this example is sensitive.

Procedures
1.  Open the web browser that UiPath will use.  For this example we will assume it is I.E.  

2.  Open UiPath.

3.  Click the "Blank" option and give it a name (e.g., contint).  Give it a description (e.g., "Cool description").

4.  Click "Create".  You should see the "Design" tab clicked at the top.  You should see "Activities" on the lefhand side.  

5.  On the lefthand side in "Activities", drill down by expanding Available -> UI Automation -> Browser -> and drag "Open Browser" to "Drag activity here" in the middle of the screen.

6.  In the "Open Browser" box, there should be a field for the URL.  Enter "http://rpaforum.net" with no quotes.

7.  Drill down in Activities by expanding "Available" then going to -> UI Automation -> Element -> Mouse -> drag "Click"  to be the step beneath the step just created.

8.  In this new step, click "Indicate element on screen".  Hover to the "Log In" button. Click it.

9.  Drill down in Activities by expanding "Available" then going to -> UI Automation -> Element -> Image -> Mouse -> drag "Click image"  to be the step beneath the step just created.

10.  Under this new step, click "Indicate element on screen"

11.  With the red mouse cursor go to a pixel slightly above the "ss" in "Email address" button in the upper righthand corner.  Create a rectangle from that spot to a portion of the field where the email address should be typed.  The center of this snippet that you capture with a rectangle should be in the field where you type the email address.  So create the rectangle accordingly.

12.  Drill down in Activities by expanding "Available" then going to -> UI Automation -> Element -> Keyboard -> drag "Type Into" to be the step beneath the step just created.

13.  In this new box, click the field that says "Text must be quoted".  Type in the email address in quotes (e.g., "rpa@continualintegration.com").

14.  Drill down in Activities by expanding "Available" then going to -> UI Automation -> Element -> Image -> Mouse -> drag "Click image"  to be the step beneath the step just created.

15.  Under this new step, click "Indicate element on screen"

16.  With the red mouse cursor go to a pixel slightly above the "rd" in "Password" button in the upper righthand corner.  Create a rectangle from that spot to a portion of the field where the password should be typed.  The center of this snippet that you capture with a rectangle should be in the field where you type the email address.  So create the rectangle accordingly.

17.  Drill down in Activities by expanding "Available" then going to -> UI Automation -> Element -> Keyboard -> drag "Type Into" to be the step beneath the step just created.

18.  In this new box, click the field that says "Text must be quoted".  Type in the email address in quotes (e.g., "Password").  (Remember that this password will not be stored securely.  This is just a proof-of-concept set of directions.)

19.  Drill down in Activities by expanding "Available" then going to -> UI Automation -> Element -> Image -> drag "Click image"  to be the step beneath the step just created.

20.  In this new step, click "Indicate element on screen".  Hover to the button where the "Log In" button is to be clicked to log in.  Click it.

21.  In UiPath click the "Save" button (an icon of a 3 X 5 floppy disk in the upper lefthand corner).

22. Press F5 or click "Run".

Leave a comment

Your email address will not be published. Required fields are marked *