09-06-2011, 11:28 AM
Hi Gump,
As per my understanding your query the below code will solve your problem.
(Before that you have to change settings in File ->Settings->Run->Check Run One Iteration Only)
As per my understanding your query the below code will solve your problem.
(Before that you have to change settings in File ->Settings->Run->Check Run One Iteration Only)
Code:
'Count all rows in Global datatable
iCount = DataTable.GetRowCount
msgbox iCount
For i = 1 to iCount
InvokeApplication "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
cData = DataTable.Value("A","Global")
msgbox cData
If Strcomp(cData,"ABC") = 0 Then
Dialog("Login").WinEdit("Agent Name:").Set "Suresh"
Dialog("Login").WinButton("Cancel").Click
else
Dialog("Login").WinEdit("Password:").Setsecure "4e65b185ba904947d41d711097890e962b647446"
Dialog("Login").WinButton("Cancel").Click
End If
DataTable.SetNextRow
Next