Tuesday, January 8, 2019
9:57 PM
World Business Zone
UFT Automation
No comments
Generation of Scripts for Windows Application
Record and Playback:
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Close
Above scripts are recorded for default "flight reservation" free windows application available in QTP,
Variation of scripts for Windows and Web:
There are some difference in scripts that we can see here for recording windows and web application,
for web application we are using the "object" of the text box as WebEdit (" ") and for button "WebButton"
for windows application the "object" of the text box here we used as WinEdit(" ") and for button "WinButton".
By keeping the above recorded scripts to bring up the same for the basic framework level we need to implement some validation codes to run the recorded scripts once giving play back in QTP,
Systemutil.Run(""C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4b.exe")
Dialog("Login").Active
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Close
The above code will give the best output while QTP play back the scripts.
Dialog("Login").Active - Indicates the login window should active to display whenever the user playback the scripts
Related Posts:
Generation of Scripts for Web Application Generation of Scripts for Web Application Record and Playback:Browser("name of the application in the browser").Page("name of the page in the browser").object("name of the object identified").OperationSo, This is the basic … Read More
Steps to follow before starting Automation Steps to follow before starting Automation Analyze the Manual Test Cases a) Requirement Test suite creation … Read More
Debug the QTP Scripts Debug the QTP Scripts 1. Pause2. Step into3. Stepout4. Stepover5. Debug Viewer … Read More
How may Types of Recording in UFT / QTP? How may Types of Recording in UFT / QTP? Three types of Recording in UFT/QTP. 1. Normal Recording:2. Analog Recording:3. Low Level Recording:… Read More
Enhancing the Scripts for Automation Enhancing the Scripts for Automation 1. VB Scripts2. QTP Methods3. Parameterization4. Checkpoints5. Synchronization6. Regular Expression7. Recovery Scenarios8. Environment Variable… Read More
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment