01-19-2008, 05:29 PM
@Satyavathi, webapp, Rajashekhar:
Here is a sample recording for your reference. Use VB and ActiveX add-in only, since this is a windows based application.
Normal Recording:
In Descriptive Programming: I have only changed the first line to DP for your understanding. You can change the all the lines and check by yourself.
Both codes above are working fine and there is no problem in recognizing the menu options.
@Rajashekhar: A word of advice-- Use analog/low level recording only when you have no other means left to record application. It can create problems with different screen sizes and monitor resolutions.
Here is a sample recording for your reference. Use VB and ActiveX add-in only, since this is a windows based application.
Normal Recording:
Code:
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure "4791e267c9e855ee42eecb1f216641f320bd96f9"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;New Order"
Window("Flight Reservation").WinMenu("Menu").Select "Analysis;Reports..."
Window("Notepad").Close
Window("Flight Reservation").Close
In Descriptive Programming: I have only changed the first line to DP for your understanding. You can change the all the lines and check by yourself.
Code:
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("text:=Login", "nativeclass:=#32770").WinEdit( "nativeclass:=Edit", "attached text:=Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure "4791e267c9e855ee42eecb1f216641f320bd96f9"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;New Order"
Window("Flight Reservation").WinMenu("Menu").Select "Analysis;Reports..."
Window("Notepad").Close
Window("Flight Reservation").Close
Both codes above are working fine and there is no problem in recognizing the menu options.
@Rajashekhar: A word of advice-- Use analog/low level recording only when you have no other means left to record application. It can create problems with different screen sizes and monitor resolutions.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course