Monday, 17 March 2014

QTP Recording & Running

context sensitve and analog recording mode: SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe... thumbnail 1 summary

context sensitve and analog recording mode:


SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"


Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "fasdf"
Dialog("Login").WinEdit("Password:").SetSecure "503dbe745c2af4bb41c02bb0ae8aaf7ea4ab17cc"
Dialog("Login").WinButton("OK").Click


Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set DataTable("Order_Number", dtGlobalSheet)
wait(2)
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Window("Flight Reservation").Close


Low level recording mode:

Window("Login").Activate
Window("Login").WinObject("Agent Name:").Click 55,7
Window("Login").WinObject("Agent Name:").Type "abcd"
Window("Login").WinObject("Password:").Click 32,8
Window("Login").WinObject("Password:").Type "mercury"

Window("Login").WinObject("OK").Click 27,11

No comments

Post a Comment