1. What is action split and the purpose of using this in QTP?
Action split is to separate an existing action into two parts. The purpose is to separate actions based on their functionality to develop code re-use.
2. Explain how QTP identifies object?
QTP recognise any GUI Object based on its corresponding properties. While recording, QTP will identify and store peculiar properties (as defined in the Object Identification settings) in the object repository of the GUI object. At run-time, QTP will compare the stored property values with the on-screen properties, to a way that belongs to identify the GUI object.
3. How many types of recording modes in QTP? Which will be used when?
QTP supports 3 types of recording modes:
Normal Mode: It is the default recording mode and takes full advantage of QTP's Test Object Model. It recognizes objects regardless of their position on -screen. This is the preferred mode of recoding and is used for most of the automation activities.
Low-level recording mode: This mode records the exact x,y co-ordinates of your mouse operations. It is helpful in testing hashmaps. It is useful for recording objects not recognize by normal mode of QTP.
Analog mode: This mode records exact mouse and keyboard "movements" you execute in relation to the screen / application window. This mode is useful for the operation such as drawing a picture, recording signature, pull and drop operations.
4. Explain the keyword CreateObject with an example.
Creates and returns a reference to an Automation objectSYNTAX: CreateObject(servername.typename [, location])Arguments
servername: Required. The name of the application providing the object.
typename : Required. The type or class of the object to create.
Location: Optional. The name of the network server where the object is to be created.
Example: Set IE = CreateObject("InternetExplorer.Application")