Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to capture data from winlist.
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi ,

While practicing with Mercury flight Application i want to retrieve few values which i could not as i am novice to QTP.can anyone help me ?

In Flight reservation app , I have selected date , From & To location now when i select flight button i got win list with details of all available flight on that date to particular location.

Now how to -
1. Check if there is any flight after 7:00 AM ?
2. How to select Cheapest Flight ?
3. Find out if any flight with AA airline ?
4. Count Number of flights available ?

I have tried to do it myself but I could not find any way to capture data from WinTable.

Your help will be highly appreciated.

Thanks
Neeraj
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Code:
Rcount=Window("Flight Reservation").Dialog("FlightsTable").WinList("From").getroproperty("itemscount")
msgbox Rcount
Dim x
ReDim x(Rcount)
For i=0 to RCount-1
    Text=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItem(i)
        x(i)=Text
Next

The above code will help u to get the data from winlist view to an array.
now u can use regular expressions to filter the data as per your requirement
to find the cheapest flight use right() function and move the values into another array and compare the values of the array
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WinList Behavior marse91782 0 2,940 11-24-2016, 06:32 AM
Last Post: marse91782
  Grid identified as WinList anushachanda 4 4,649 09-12-2012, 12:04 PM
Last Post: anushachanda
  QTP doesn't identify the Objects which are in WinList Sushanth 0 3,912 08-13-2012, 04:20 PM
Last Post: Sushanth
  unable to identify Checkbox Property inside the WinList Object tech.savy987@gmail.com 2 4,286 07-20-2012, 10:18 AM
Last Post: Shridevi.Salagare
  How to capture/parameterize ID's created on the server side that QTP does not capture rdwaram 1 2,899 10-17-2009, 02:37 AM
Last Post: jsknight1969

Forum Jump:


Users browsing this thread: 1 Guest(s)