07-31-2014, 08:36 PM
(This post was last modified: 07-31-2014, 08:41 PM by dharshinishankari@gmail.com.)
My issue is quite similar.
I have a table with 2 columns (LoginName and Password) and 468 rows.
I need to get the login name and password using a input box and on clicking login button. The system should verify if the login name and password is present in the table and only then allow to login. when i try executing the following code the loop is executed 468 times but exits unsuccessfully.
Pls help. below is the code that i used.
Regards,
I have a table with 2 columns (LoginName and Password) and 468 rows.
I need to get the login name and password using a input box and on clicking login button. The system should verify if the login name and password is present in the table and only then allow to login. when i try executing the following code the loop is executed 468 times but exits unsuccessfully.
Pls help. below is the code that i used.
Code:
Rowcount= DataTable.GetSheet("Global").GetRowCount
msgbox "RowCount= " &RowCount,1
CurrentRow= DataTable.SetCurrentRow(1)
Browser("").Sync
Browser("").Page("").Sync
Browser("").Page("").Frame("Frame").WebEdit("UserName").Click
a= inputbox("Enter User Name")
For i = 1 To Rowcount Step 1
col_LoginName=DataTable.Value("LoginName")
If col_LoginName=a Then
SetCurrentRow(i)
msgbox "done"
Browser("").Page("").Frame("Frame").WebEdit("Password").Click
b= inputbox("Enter Password")
End If
Next
Browser("").Page("").Frame("Frame").Link("Login").FireEvent "onClick", validate()
Function validate()
msgbox "success"
End Function
Regards,