Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve row number based on value in DataTable
#7
Solved: 10 Years, 9 Months, 2 Weeks ago
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.

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,
Reply


Messages In This Thread
RE: Retrieve row number based on value in DataTable - by dharshinishankari@gmail.com - 07-31-2014, 08:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error as Global Not defined while trying to retrieve value from Datatable siddharth1609 0 856 09-11-2019, 02:52 PM
Last Post: siddharth1609
  Cannot retrieve Native property JeL 1 923 07-29-2019, 05:41 PM
Last Post: JeL
  DataGrid: double click on selected row robertosalemi 0 4,292 05-12-2016, 03:00 PM
Last Post: robertosalemi
  Row count is always shown as 1 Harry1999 0 1,979 04-14-2016, 11:11 PM
Last Post: Harry1999
  To retrieve content of a WEBEDIT object alpha1 2 2,421 06-11-2015, 11:21 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)