Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to choose a random no from list
#1
Not Solved
Code:
Window("Flight Reservation").ActiveX("MaskEdBox").Type DataTable("DepartureDate", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly From:").Select cint( DataTable("Flyfrom", dtGlobalSheet))
Window("Flight Reservation").WinComboBox("Fly To:").Select cint (DataTable("Flyto", dtGlobalSheet))
Window("Flight Reservation").WinButton("FLIGHT").Click
Dim n
n=Window("Flight Reservation").Dialog("Flights Table").WinList("From").Getitemscount
Window("Flight Reservation").Dialog("Flights Table").select RandomNumber(1,n)
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").click
Window("Flight Reservation").WinEdit("Name:").Set DataTable("TicketHolder", dtGlobalSheet)
Window("Flight Reservation").WinEdit("Tickets:").Set DataTable("No_of_Tickets", dtGlobalSheet)
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinButton("Update Order").Click
Window("Flight Reservation").Close

the above script is not executing.can anyone tell me whats wrong in that.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a random number starting with an alphabet QTPmate 4 4,191 07-31-2014, 09:29 AM
Last Post: QTPmate
  How to choose excel version to work with? Elimelech.Eli 0 1,621 06-23-2014, 04:46 PM
Last Post: Elimelech.Eli
  How to choose Framework for a project AshokReddy 1 2,730 01-15-2014, 03:41 PM
Last Post: madhavanr
  Random Values from Drop-Down profqa 5 6,020 12-06-2013, 09:01 AM
Last Post: basanth27
  Creating Random String SomeIntern 0 5,080 08-21-2013, 09:10 PM
Last Post: SomeIntern

Forum Jump:


Users browsing this thread: 3 Guest(s)