I need to enter a username and a password, and the password is stored (as recommended) as a SecureString.
What would be the best way to press Enter after entering the password?
Because it’s a SecureString, I can’t concatenate the password + “[k(enter)]”.
I know I could click OK or even send a hotkey for Enter, or type only the Enter key again in the same field, but I would like to do it within the same activity since the more activities, the longer it takes to execute and the more chances of errors.
Thanks and regards
The best way is to use a separate activity by clicking on the sign-in button as the page is already loaded this activity will take some milli seconds to execute.
Hii @Roger_Vidal ,
you can achieve this in two ways
- you have to convert the secure string to string then the hardware events will work
String plainStr = new System.Net.NetworkCredential(string.Empty, secureStr).Password
- Use separate activity to enter
Thank you! It works, but does this compromise the security of the login?
In case it does, is there any other way to achieve this within a single ‘type into’ without compromising security?
Enter the password with Type Into as securestring, then use a Keyboard Shortcuts activity to press Enter.
"Thanks, everyone. I see that for now, pressing Enter within the same activity while using a SecureString is not possible. I suggest to UiPath that they might consider adding that option to the ‘Type Into’ activity in future updates.
I am able to do press Enter and press tab within Type Into activity itself .
I am reading password as a securestring , and in the same activity I am clicking on Enter for logging to a website . It works for me .
Please look into the attachment .
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.