About Me

Gaurav Seth is a a Senior Automation Test Analyst with experience in QTP, Selenium and Ranorex tools and currently working on Automating in C# for a FX trading Client

HP QTP FAQ 2

In what situations QTP will not recognize the Objects or it finds that two objects have same name ?

QTP provides two options for object identification Tool->Object Identification it provides a furthur option under it called smart Identification..u can configure it to recognize the objects which are not recognised by QTP normally!!

QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time.

Check this out-

If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object.

While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.

The Smart Identification mechanism uses two types of properties:

Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link's tag was changed from to any other value, you could no longer call it the same object.

Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.


How to handle dynamic objects in QTP?
1. Dynamic object is an object which changes its properties at the run time and thus its mandatory properties cant be predicted from the starting.
To automate these objects properties objects should be used. Here a property object is created using the description class.
Set Obj1 = Description.Create()
n then you can assign the name and title values to this custom object and these values can be captured during the runtime and hence using these values this custom object will identify the dynamic object in your application.
2. Regular Expression solves the problem of dynamic values in QTP.
3. GETROProperty

How many types of Actions are there in QTP?

There are three kinds of actions:
Non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once.

Reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.

External action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.

What is the difference between Call to Action and Copy Action.?

Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)

What are the Test Objects and the Run Time Objects and the difference between them

Test objects are basic and generic objects that QTP recognize. Run time object means the actual object to which a test object maps.
Can i change properties of a test object

Yes. You can use SetTOProperty to change the test object properties. It is recommended that you switch off the Smart Identification for theobject on which you use SetTOProperty function.
Can i change properties of a run time object?

No (but Yes also). You can use GetROProperty(“outerText”) to get the outerText of a object but there is no function like SetROProperty tochange this property. But you can use WebElement().object.outerText=”Something” to change the property.

Library Files or VBScript Files
How do we associate a library file with a test ?


Library files are files containing normal VBScript code. The file can contain function, sub procedure, classes etc.... You can also use executefile function to include a file at run-time also. To associate a library file with your script go to Test->Settings... and add your library file to resources tab.