Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Data Table
#1
Solved: 10 Years, 7 Months ago
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...

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.


Attached Files Image(s)
   
Reply
Jump to the post that solved this thread.


Messages In This Thread
Problem with Data Table - by Rakesh Sahukari - 10-14-2013, 12:20 PM
RE: Problem with Data Table - by Sandeep81 - 10-24-2013, 05:22 PM
RE: Problem with Data Table - by Rakesh Sahukari - 10-24-2013, 08:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  data table use uft_usr 1 2,121 06-29-2016, 05:23 PM
Last Post: Ankesh
  Writing to Run time data table Neetha 5 11,711 08-27-2015, 10:18 AM
Last Post: supputuri
  Retrieving data from web table nsuresh316 1 2,975 03-03-2014, 08:29 AM
Last Post: basanth27
  How to get data from data table in Ascending order dipashri 1 3,461 01-28-2014, 09:54 PM
Last Post: jacosta
  Data Table Query Suma Parimal 4 4,499 01-21-2014, 12:50 PM
Last Post: Suma Parimal

Forum Jump:


Users browsing this thread: 1 Guest(s)