10-14-2013, 12:20 PM
(This post was last modified: 10-15-2013, 09:30 PM by Rakesh Sahukari.)
I am just giving some user credentials in data table and executing the flight application
My Data Table look likes below..
Username Password
---------- ---------
aaaaa mercury
bbbbb testing
ccccc mercury
Actually the scenario is to check with each of the user credentials & verify whether the user credentials are correct or not.
Below is my code...
When I am executing the above code,I can able to verify the 1st user credential but after that I am geeting the run time error as 'Column Name Username does not exists'
Please find the attached screen shot regarding my error.
My Data Table look likes below..
Username Password
---------- ---------
aaaaa mercury
bbbbb testing
ccccc mercury
Actually the scenario is to check with each of the user credentials & verify whether the user credentials are correct or not.
Below is my code...
Code:
InvokeApplication "C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
CntDtData=DataTable.GetRowCount
For i=1 to CntDtData
Username1=DataTable.Value("Username",i)
Password1=DataTable("Password",i)
Dialog("Login").WinEdit("Agent Name:").Set(Username1)
Dialog("Login").WinEdit("Password:").Set(Password1)
Dialog("Login").WinButton("OK").Click
If Window("Flight Reservation").Exist Then
Reporter.ReportEvent micPass,"Flight Reservation","Login Successful for user:"&Username1
Window("Flight Reservation").Close
InvokeApplication "C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
else
Reporter.ReportEvent micFail,"Flight Reservation","Login Unsuccessful for user:"&Username1
Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
End If
Next
else
Reporter.ReportEvent micFail,"Login Window","Login Window is not displayed"
End If
When I am executing the above code,I can able to verify the 1st user credential but after that I am geeting the run time error as 'Column Name Username does not exists'
Please find the attached screen shot regarding my error.