Difficulties in identifying dynamic objects

Sometimes, the user has an object with a dynamic description (e.g., the name property is completely dynamic). Regular Expressions will not help in this case, since the whole name is changed between runs.

Uniquely identifying dynamic objects

When QuickTest Professional has difficulties identifying objects uniquely, you may need to change the properties used in the description of the object.

There are two ways to do this:

  1. Configure the properties that are used to identify the object class.Note:
    These changes will affect all objects of this class type.For QuickTest Professional 6.0 and above
    QuickTest Professional 6.0 added the Object Identification tool to allow you to configure the properties which are learned for object classes.

    1. Go to Tools -> Object Identification.
    2. Select the environment type (e.g., ActiveX or Java) for the problem object from the Environment combobox.
    3. Select the object class in the Test Object classes list. The lists on the right side of the dialog will be populated with the current mandatory and assistive properties.
    4. Click <Add/Remove> under the desired list.
    5. Clear the checkbox next to the dynamic properties.
    6. Select the checkbox next to the new properties you wish to use.
    7. Click <OK>.
    8. Click <OK> to close the Object Identification dialog.
    9. Relearn the objects into the Object Repository.

    For detailed step by step instructions, please refer to the “Configuring Mandatory and Assistive Recording Properties” chapter in the User’s guide.

    For Astra QuickTest/QuickTest Professional 5.6 or below

    1. Open the registry editor (Start -> Run -> regedit.)
    2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\<object>\Description where <object> is the class type of the problem object. Expand the Astra QuickTest folder if you are using Astra QuickTest. You will see a list of properties that are used to identify these objects.
    3. Remove the dynamic property by right-clicking on the value and selecting Modify. Set the value data to zero. Repeat as needed.
    4. Add a new property to identify the object. Go to Edit -> New -> DWORD Value. Enter the name of the property to be used. Right-click and select “Modify.” Set the value data to 58 Hexadecimal to make the property mandatory or 448 Hexadecimal to make the property additional (used if there are not enough mandatory properties to uniquely identify the object). Repeat as needed.
    5. Close the registry.
    6. Restart Astra QuickTest/QuickTest Professional.
    7. Relearn the object into the Object Repository.

    You can find a list of available properties in the registry at HKEY_CURRENT_USER\Software\Mercury Interactive\Astra QuickTest\MicTest\Attributes (or QuickTest Professional if you are using QuickTest Professional).

    Note:
    The exact paths within the registry may differ slightly with different versions of the applications. Also, all the properties listed under the registry key may not be available for all objects.

  2. Instruct QuickTest Professional to use different properties only for the problem object.Note:
    These changes will affect only the objects you modify but will not affect other objects of the same class type.QuickTest Professional 9.0
    For information on modifying object property or property values in QuickTest Professional 9.0, QuickTest Professional 8.2 and below

    1. Right-click on the object in the Keyword View (Tree View, in QuickTest Professional 6.5 and below).
    2. Select Object Properties.
    3. Click <Add/Remove> and clear the checkbox for the dynamic property.
    4. Click <OK> to close the Add/Remove Properties and Object Properties dialogs.
    5. Go to Tools -> Object Repository.
    6. Select the problem object in the object repository tree.
    7. Click <Add/Remove>.
    8. Set the checkbox next to the properties you wish to use to uniquely identify the object.

9 Responses to “Difficulties in identifying dynamic objects”

  1. MS Says:

    What are the basic settings to be changed to record the mainframe screen. I have installed TE addin to QTP.

  2. Prasad gali Says:

    Hi ,

    The explanation given by you so nice.

    Thanks

  3. K Anshu Says:

    Thanks your suggestions are quit good. Currntly I am facing some problem in identifying object for Mainframe application. Script has not generated with suffix TeWindow. I have installed QTP 9.2 with TE 8.0.
    I have selected chek box for Terminal Emulator. But Still script generates simplly like Window. In object Identification, I have selected TE and did Add/Remove Properties for TeWindow, TeScreen, TeField also.
    If you have any solution please send reply.

  4. Rajendra Says:

    How can we recognise a java application without Java Add-In in QTP

  5. Neeru Saini Says:

    Good and Informative content

  6. Rahul Says:

    Hi everyone, Please can somebody help me to find out how to use “Object identification” function or “Smart Identification”

    I am running SAP application and one TableTreeControl object is recording for example value “Inbox;Worktable 22”.

    So how i identify this one becoz everytime the vale “22” is incresing.. Really appreciate your help.

    Thanks….buddy

  7. Megha Says:

    What is the most effective method for unique identification of object

    Descriptive programming
    Smart identificaton
    Giving unique name to object

  8. Megha Says:

    How to connect to Oracle database through QTP script

    I am connecting to Oracle database through SQL developer which only requires connection string and username and pwd but for connecting it from QTP now what should I do as I don’t have driver and other information

  9. Anila Suresh Says:

    I am facing problem in capturing registry keys while automating.. Could anybody help me?

Leave a comment