Using a variable in the "Type Into" activity to autofill a password

Hello,

I am working on an automation that extracts a login and password out of an email, enters these two values into an excel file, moves a PDF file from the download folder into a new folder, opens up the moved PDF file, then enters in the password from the email into the PDF’s password field in order to open up the document, and finally, clicks OK to open up the PDF. The automation run successfully through all the steps, except for entering the password. I have tried entering in the password variable that is used to log the password into the email and I have tried System.Text.RegularExpressions.Regex.Replace(password, “\s+”, “”). Nothing seems to work. If I manually enter the actual password into the Type Into field, it will successfully transfer the password to the PDF password field and open up the PDF.
Any and all information, ideas, or solutions would be greatly appreciated. Thank you very much.

Hi @craig.mcdonald

Please cross check that variable contains the same value that you are trying to enter manually. Secondly, is that password variable type of secure string or just string? Try with both ways.

For modern activities.. Use type into activity and provide a variable. if the password variable is string, then simply choose Standard as shown in screenshot 1 below. if it is secure string, then choose Secure and provide the variable like in screenshot 2.

For classic activities.. use type into activity to provide a string variable. use type secure text activity to provide a secure string variable.

hi,
please use this below debug steps :slight_smile:

  1. please check the output of the password that you are trying to type into using write line or message box
    2)If the extracted password contains white spaces, the Regex command that you have mentioned should work,
    3)Later in the Type Into activity check whether you are using Standard or Secure way in entering password. If the password is in string format and you can see the text that it supposed to enter then you cannot pass it in secure string variable and use secure option.

check the steps and let me know if any issue happens.

thanks!