User Guide
16 Working with QuickTest Professional
QTP stores a set of parameters for each operation that define aspects of the operation. These
parameters include what keys were held down when the mouse was clicked or the X and Y
position of the target in a drag and drop operation. Operation parameters also record where
the interaction originated —for example, from the keyboard or the mouse.
When recording operations on Flex controls, QTP records the way in which the operation is
carried out. QTP records whether events were caused by the mouse or keyboard, as playback
can be different for each case. For example, when a button is clicked using the mouse, the
following events are dispatched: mouseDown, mouseUp, and click. However, if the button
was clicked by having the spacebar pressed when the button had focus, the events dispatched
are keyDown, keyUp, and click.
In order to make the scripts more readable, the Flex plug-in minimizes the number of event
parameters recorded in a script. To reduce recording common information, QTP has a default
parameter for each operation. The default value for the interaction type of a Button click is
“mouse”. If an operation parameter is the same as its default value, then QTP does not record
it. For example, instead of recording:
FlexButton(“buttonId”).Click “mouse”
QTP only records:
FlexButton(“buttonId”).Click
The default action is the mouse click because most of the time a FlexButton click is done with
the mouse and not the keyboard.