Shao Khan
Shao Khan

Reputation: 450

UIPath how to set user and password automatically?

I open my browser with UIPath and navigate to a site with .htaccess protection. How can i set there a username and a password to login automatically ?

Until now i used a "input dialog" and "TypeInto" to try this and had no success.

try to get username by UIPath dialog box

Thank you.

Upvotes: 0

Views: 2075

Answers (2)

Shao Khan
Shao Khan

Reputation: 450

To jump from one input to another i use the "Send Hotkey" function. So I do not have to guarantee that the fields are in the correct place, but only that the tab stops are set correctly.

Procedure:

Password is stored as variable and set in the first input field with password.ToString, then use "Send Hotkey" function with "tab" as desired key.

To submit the form i use the same "Send Hotkey" but here the "enter" key instead of "Tab".

enter image description here

Upvotes: 0

James
James

Reputation: 37

I'd make a simple macro and move the mouse to the correct X,Y coordinates, which RPA tools typically make easy to ascertain, then click it and send the keyboard keys.

Here's a quick example from AppRobotic macro edition that I use with Python:

import win32com.client
x = win32com.client.Dispatch("AppRobotic.API")
import webbrowser

# specify URL
url = "https://www.google.com"

# open with default browser
webbrowser.open_new(url) 

# wait a bit for page to open
x.Wait(3000)
# use UI Item Explorer to find the X,Y coordinates of Search box
x.MoveCursor(438, 435)
# click inside Search box
x.MouseLeftClick

x.Type("AppRobotic")
x.Type("{ENTER}")

Upvotes: 1

Related Questions