Crypt Object in QTP is used to Encrypt the given password, This scenario is just to confirm whether the given password is saving as Encrypted, This object is used in different ways in different methods,
Below scripts are done for a sample login page, to show how the given password is encrypted before the page get login
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE",
"test.sso.com"
Browser("IdPInitiated:Identity").Page("IdPInitiated:Identity").WebEdit("txtUserName").
Set"68testuser1"
pwd="abc123"
e_pwd=Crypt.Encrypt(pwd)
msgbox e_pwd
Browser("IdPInitiated:Identity").Page("IdPInitiated:Identity").WebEdit("txtPassword").SetSecure e_pwd
Browser("IdPInitiated:Identity").Page("IdPInitiated:Identity").WebButton("Login").Click
Browser("IdPInitiated:Identity").Page("SPInitiated:Identity Provider").WebButton("Goto Sdp").Click
Before the password is getting entered it gets encrypted and shows the encrypted text in the (msgbox) as we declared in the script, Once the 'OK' button is clicked from the msgbox, the password get entered in to the password field for the next step to the login.
There is another method the password get encrypted directly to the password field for login by declaring below variable in different object method
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE",
"test.sso.com"
Browser("IdPInitiated:Identity").Page("IdPInitiated:Identity").WebEdit("txtUserName").
Set"68testuser1"
password = "abc123"
sEncryptedPwd = Crypt.Encrypt(password)
Browser("IdPInitiated:Identity").Page("IdPInitiated:Identity").WebEdit("txtPassword").Set"abc123"
Browser("IdPInitiated:Identity").Page("IdPInitiated:Identity").WebButton("Login").Click
Browser("IdPInitiated:Identity").Page("SPInitiated:Identity Provider").WebButton("Goto Sdp").Click

thanx for help brother..
ReplyDeleteEjobsjunction || Durva Greens || Ejobsjunction.com Part time jobs
Gain hands-on skills with tableau developer training designed to build interactive dashboards and data-driven insights.
ReplyDeleteMaster the salesforce admin course to manage users, automate workflows, and customize Salesforce with confidence.
ReplyDeleteMaster your CRM skills with a salesforce development course designed to teach real-world customization, automation, and app building.
ReplyDelete"Boost your career with our comprehensive salesforce admin training
ReplyDelete, designed to equip you with essential skills to manage and optimize Salesforce effectively."
"Enroll in salesforce developer training
ReplyDeleteto master platform customization, Apex coding, and Lightning components for a successful career."
"Boost your career with salesforce admin course
ReplyDeletedesigned for beginners and professionals alike. Learn to manage Salesforce efficiently and unlock new opportunities in the CRM world."
"Enhance your data analytics skills with power bi online training
ReplyDeletedesigned for beginners and professionals alike. Learn to create interactive dashboards, insightful reports, and master data visualization at your own pace."
"Boost your career with salesforce development course
ReplyDeletedesigned to teach hands-on skills in Apex, Visualforce, and Lightning components."