2. QTP – Recording Types
There are three types of Recording
• Context Sensitive or Normal Mode
• Analog
• Low Level
3. Normal Recording
• It is the default mode of recording which takes full advantage of Quick Test Professional's test object
model.
• It recognizes objects in application regardless of their location on the screen.
• It records the objects in your application and the operations performed on them
• Clicking on Record button will enable the Normal recording
• In case if you want to record in other modes then you have first start recording and then switch to
other modes
4. Normal Recording – Web Apps
To record in QTP
• Go to Automation Tab on the
menu bar
• Click on the Record and Run
settings
5. Normal Record and Run – Web Settings
• To record on the browser that is
already opened select the first option
– Record and run test on any open
browser
• Click on Ok Button
• Then open Internet Explorer and
perform the actions that has to be
recorded
6. Normal Record and Run – Web Settings
• Select the second option if you
want QTP to open new
instance of an internet
explorer browser and then
start recording
• Select the URL – for example
http://facebook.com and
Browser Type as Microsoft
Internet Explorer
• Click on Ok Button
7. Normal Recording
• As shown here Internet
explorer will get
launched and will
navigate to
facebook.com when you
click on record button
• Perform the actions like
providing the First name
and Last Name etc.
• The actions that you
perform will get
recorded by the QTP.
8. Normal Recording
• As shown here
the QTP records
all the actions
that user
performs on the
browser.
• The Highlighted
code will get
generated while
recording the
events.
9. Record and Run – Windows App Settings
To record in Windows applications in QTP
• Click on Automation Tab on the menu bar as
shown before
• Select Record and Run settings
• Then navigate to the Windows applications tab
on the Record and Run settings
• If you want to record on already open windows
application then select the first option
• If you want to QTP to open the application and
record then select the second option and click
on add symbol
• A window to select the application will get
launched , as given in next slide
10. Record and Run – Windows App Settings
• On the Application details window select
the windows application that you want
to automate
• For example : if you want to automate
Sample QTP application – Flight
Reservation
• Click on browse button and Navigate to
the executable .exe file of the Flight
application present in C:program
Files(x86)HPQuick Test
Professionalsamplesflightappflight4a
.exe
• Click Ok
11. Record and Run – Windows App Settings
• Once the application gets selected
the click OK button on Record and
run setting to Launch the Windows
application and record
• All the events that you perform on
the VB sample application will get
recorded in the same way as the
Web application
12. Normal Record and Run or Context Sensitive mode
Below are the steps to record the script on the Flight Reservation Application
1. Click on Record button
2. On the Record and Run Settings dialog box, click on Windows Applications and then select the Record
and run only on radio button.
3. Click on the + icon and then on the Application Details dialog box, click on OK button.
4. Click on Apply and then click on OK.
5. Record the script.
6. Click on Stop to stop the recording and then click on Run to execute the script
Ex: Flight Reservation Application
13. Ex: Flight Reservation Application
Here are the steps to perform the
normal record and run on any
other window application
(Example: Calculator)
1. Click on the Record button
2. On the Record and Run
Settings dialog box, click on
Windows Application and
then select the Record and
run test on any open Window-
based applications
3. Click on Apply and then click
on OK
14. Recording – Low Level Recording
Low Level
• This mode enables you to record on any object in your application, irrespective of QTP
recognizes the specific object or the specific operation.
• This mode records at the object level and records all run-time objects as either Window or
WinObject test objects.
• It is used when the exact coordinates of the object are important for your tests.
• Used when recording tests in an environment (or on an object) not recognized by QTP
• Low level mode records the x,y coordinates of any clicks
15. Recording – Low Level Recording
• To select the Low Level recording
• First do all the settings as
mentioned in the Normal recording
• Then click on the record button
• Once the QTP starts recording
switch the recording mode from
Normal to Low Level Recording as
shown here
• QTP will start recording in low-level
once you select Low Level Recording
16. Recording – Low Level Recording
• As shown below QTP records all the Low level events like capturing the screen coordinates for mouse
clicks and also records keyboard operations
• The Low level recording should be used when the QTP cannot recognize the object
17. Recording – Low Level Recording
Consider the following guidelines when choosing Analog Recording or Low Level Recording:
Use analog recording or low-level recording only when normal recording mode does not accurately
record your operation
Analog recording and low-level recording require more disk space than normal recording mode
You can switch to either Analog Recording or Low Level Recording in the middle of a recording session
for specific steps. After you record the necessary steps using analog recording or low-level recording,
you can return to normal recording mode for the remainder of your recording session.
18. Recording – Analog Recording
Analog Recording Mode:
• In analog recording mode, Quick Test Professional records and tracks every movement of the mouse as
you drag the mouse around a screen or window.
• QTP's Analog recording is captured as Tracks and stored in the directory of your test
• It is useful for recording operations that cannot be recorded at the level of an object. Eg., A signature
produced by dragging the mouse
• In Analog mode you can record
• Record Relative to screen
• Relative to window
• When your analog operation are confined to just one window , use relative to window
• When your analog operation involve multiple screens like dragging and dropping an object from one
window to other use the screen option
19. Analog Recording - Example
Analog recording mode:
1. Click on Record button and then click on Analog recording icon.
2. On the Analog Recording Settings dialog box, do any of the radio buttons.
i. Select the Record relative to the screen radio button, if you perform analog operations on objects
located within more than one window or if the window itself may move while you are recording your
analog operations.
ii. Record relative to the following window: QTP records any mouse movements or keyboard input relative
to the coordinates of the specified window.
Select the Record relative to the following window radio button.
Click on the pointing hand icon, click anywhere in the window on which you want to record in Analog
Recording mode.
Note: The title of the window you clicked will be displayed in the window title box.
Click on Start Analog Record.
20. Analog Recording - Example
Draw something on the
paint and the script gets
recorded on the QTP
window in form of Track
Note: Analog recording
mode will be enabled,
only when you click on
the Record button.
21. Record Other Windows Application - Calc
Navigate to the
location where
Calculator
exists, open the
calculator and
then start the
recording.
Calculator
=>