|
如下所示:录的脚本是想实现订十张机票,而这十张机票的起点和终点都不一致,而在点击如下图所示的"Flights"按钮以后,每次都能够取到与起始点相关的机票信息,并机票信息中取相关记录,具体的脚本应该怎么去实现.
录的相关脚本如下所示:
SystemUtil.Run "D:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","D:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Password:").SetSecure "4b8b526fd45b41276cdc0c10f557838950fb03e4"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinObject("Date of Flight:").Type "100311"
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("Start", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("End", dtGlobalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "15877 DEN 08:00 AM FRA 08:45 AM AA $100.50"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Type "M"
Window("Flight Reservation").WinEdit("Name:").Set "May"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
在脚本中将起始点两个进行了参数化..点击"Flighst"后取相关的起始点进行查询和获取机票列表不知道该怎么写.
刚开始学QTP,麻烦各位大侠帮帮忙. |
|