I am trying to script a username and password, but how do I make it so I don’t have to enter the password in the script since it wouldn’t be secure. There are different people who would run the script and each person has a different username and password. Thanks
There’s currently no way to encrypt passwords. See the example using the Ask command on this page for the best method of dealing with this scenario.
Another option would be for each person running the scripts to point to a csv file with his/her login, so before the test run each user would just change which line is commented out.
If the script requires multiple logins you could make the variable global or universal depending on which works better for your case. While you need to be mindful of how you use those, they have worked well for my team.
Set the scriptlogging to Silent #this keeps credentials from showing up in the log
point to your credentials file
put “C:\Users(your whole file path here)\credentials.csv” into MyCredentials
Put item 1 of line 2 of file MyCredentials into Username
Put item 2 of line 2 of file MyCredentials into Password
Click “login” # (where you type in the username)
TypeText Username, tabKey
TypeText Password, returnkey
Set the scriptlogging to On #resume logging