Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting text from password edit box
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi All

I need to get visible text from a password edit box. But the text is coming up in an encrpted format how can i un encrrpt the text? so i can check if i have the right password in box.

thanks
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
There is no way we can "decrypt" the passwords generated. I guess this will fail the basic purpose of having pwds.

I can suggest you a simple solution though:
Just check whether you are able to go to the next screen after entering password or check if there is no error message after entering pwds. if there is either of two, you can be sure that you have entered the right password.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months, 4 Weeks ago
I have a suggesstion for getting the password entered Password field. Hope the following script may help you.........

-----------------------------------------
Code:
Browser("B").Page("P").WebEdit("uname").Set "tester"
Browser("B").Page("P").WebEdit("pwd").SetSecure "4a5d7145b2fef00c64034e56dc213cbdf0da"
[b]A = Browser("B").Page("P").WebEdit("pwd").GetROProperty("Value")
MsgBox (A)[/b]
-----------------------------------------
Thanks
Reply
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi QTPgrd,

i am sorry to say that the LOC that you specified won't workout. As the value will return empty. so, i will agree with Ankur in this regard.
Thanks,
SUpputuri
Reply
#5
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi QTPKing,

The script provided by QTPgrd is working fine for me. I didn't find any discrepancies in the value returned.

Thanks,
Reply
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
Dear Laura

Answer replied by QTPGRD is 100 % right,I have used that in so many pages.
Reply
#7
Solved: 11 Years, 4 Months, 4 Weeks ago
Really? I tried it and all am getting is an empty msg box.
Reply
#8
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi friends,

Let us see indetail.
1) If you are entering a password with 4 chars like "P@ss" then the encrpty will be "4a5dcde055cbebeecd93bb8628e0" i.e. 28 charecters
2) when you enter the same 28 charecters using setsecure we can see only 4 chars in Password field.(****)
3) When you get the visible text or value from password edit box then there may be 2 cases
Case:1: We won't get any value (as specified by me in previous post)
Case:2: if at all we got the value the number of char's will be 4 only. Though the number of chars are 4 they not either "P@ss" or "a5dcde055cbebeecd93bb8628e0".

So guys, QTPian and sharingwilddreams please let me how i am wrong and let me know if i am going in wrong way.
Thanks,
SUpputuri
Reply
#9
Solved: 11 Years, 4 Months, 4 Weeks ago
Lets clear the confusion.
Answers posted by me and other guy was on the issue abt masked characters,thats the password getting hidden using asterisks or something like that. If this is the case,what answer he has given is right. Encryption and Decryption of passwords r out of the context.
Reply
#10
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi QTPKing

Please try the below script. This script has been recorded with our Forum.
--------------------------
Code:
Browser("SRAIS-AS Login").Page("QTP Forums").Link("Login").Click
Browser("SRAIS-AS Login").Page("QTP Forums").WebEdit("quick_username").Set "QTPgrd"
Browser("SRAIS-AS Login").Page("QTP Forums").WebEdit("quick_password").SetSecure "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
A = Browser("SRAIS-AS Login").Page("QTP Forums").WebEdit("quick_password").GetROProperty("Value")
Msgbox (A)
Browser("SRAIS-AS Login").Page("QTP Forums").WebButton("Login").Click
--------------------------
In the message box you would receive the password entered in the Password text field, say if you have entered password something like "QTP000" this would be displayed in the message box
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Password Encryption / Decryption for swfobject YogeshCallappa 0 1,773 06-23-2017, 03:57 PM
Last Post: YogeshCallappa
  How can we get the Windows application Text box background color Using UFT 11.53 Kuppampattu 3 6,121 06-06-2017, 11:12 AM
Last Post: workrohit08
  UFT 12.53 trial version not recognizing its sample flight application login/password NehaRB 2 3,992 10-07-2016, 06:49 PM
Last Post: pradeep537
  Not able to set value in application web edit box tanuj dewangan 4 3,773 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,973 09-13-2015, 12:06 AM
Last Post: ADITI1992

Forum Jump:


Users browsing this thread: 2 Guest(s)