Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem about SetSecure
#1
Not Solved
Hi,
I have written the following code with a login in website, and i use 'setsecure' for the password (exactly as when i register the code), but i don't understand why in the pwd field on the website i have only 1 hidden character and nothing else [when i register the code i have number of hidden characters equal to the number of characters of the password, that is '4' in the example below]. Any idea? (I presume this is the reason why then code fails the login)

Code:
Dim brow, pag, webuser, webpwd
Set brow     =Browser("name:=Vodafone")
Set pag      =brow.Page("title:=Vodafone")
Set webuser  =pag.WebEdit("default value:=Username", "name:=username","html tag:=INPUT","type:=text","index:=0")
'Set webpwdtxt=pag.WebEdit("name:=passwordTxt","html tag:=INPUT","type:=text")
Set webpwd   =pag.WebEdit("name:=password","html tag:=INPUT","type:=password","index:=1")

Dim user, pwd
user="abcd"
pwd="1234"

URL="http://www.vodafone.it"
SystemUtil.run "iexplore",URL
pag.Sync
webuser.Set user
webpwd.SetSecure pwd

Thank for every help
Reply
#2
Not Solved
Go to Start -> All Programs -> QuickTest Professional -> Tools -> Password Encoder

Enter the string that you want encoded. Copy/Paste that to pwd. This will be the actual Secure String for your password.

I am not sure if this is going to help solve this issue, but if it persists, please post here. Also, what happens if you do the same process manually?
Reply
#3
Not Solved
hi,
thanks for the suggestion, i'll prove it asap :-)
about other tests, i have noticed that in particular with pwd=12345678, or pwd=111111, or also alphanumeric pwd with more than 10 characters, i have no problems... the problem is with this pwd="1234567890" (in the first post i had had only '1234')
[i have proved also converting with cstr(pwd), just as attempt..]
In the manual test the normal copy/paste is correct... only in automatic run with 1234567890 i have had problems.
Reply
#4
Not Solved
Try using:

pwd = 1234567890

instead of

pwd = "1234567890"
Reply
#5
Not Solved
hi,
with the encryption ("48478e5df72e62b93bf04ef076401ac4d49efac330fa03572492" instead of "1234567890") the login functions :-)
With 1234567890 or "1234567890" the result is the same (it fails).
But with other user/pwd, not encrypted, the login functions... so i don't understand why with "1234567890" no.
thanks
Reply
#6
Not Solved
Dear stevol,
Can you pls what is max charecters for the Password filed in the application.

Regards
Sridhar
Reply
#7
Not Solved
the max number is 20 characters (i have proved alphanumeric password with more 10 characters, with success).
Maybe the user is 'dirty'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SetSecure on a WinObject? RandomGrin 1 2,769 11-04-2014, 10:00 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)