QTP 11’s Objects change with each build
Question ID: 104946
1
0

I am having trouble in my application with the objects QTP is trying to work with. The application

GUI changes with new builds, and the properties of the objects do not match from recording on one

build and playback. Does anyone know how to change them or am I stuck with updating the OR each

build?

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on April 5, 2013 3:31 pm
107 views
Answers (2)
3
Private answer

I believe what you are looking to do in QTP is modify the object indentifcation method for one or

more objects in your application. If you notice that a property or properties are constantly changing

in your application, you can make QTP ignore the standard/default properties for an object, and tell

QTP to use a different combination of properties to identify the object(s).

1. Click the Tools menu
2. Select Object Identification
3. In the Environment drop-down list, select the appropriate application environment (Windows, Web,

etc.)
4. Find the object's class on the left hand side of the object list and click it. This will show the

mandatory and assistive properties being used by QTP to learn that particular object. As the two

panels indicate, mandatory properties will always be used to first identify and object, and the

assistive properites are 'extra' properties that can be used by QTP if the combination of mandatory

properties does not cause a unique enough instance of the object.
5. Click the Add/Remove button under mandatory properties
6. Uncheck the problem property or properties, and checkmark the ones you now want to use
7. Do the same for any assistive properties you want to use
8. Optionally, if the object class supports Smart Identification, you can enable that as well. This

give QTP the ability to 'figure out' the closest matching object if the object is not identified at

run time by the Mandatory & Assistive properties
9. Choose and oridinal identifier for the object (either Location or Index). This allows QTP to

create instances of objects if more than one object in the GUI matches the properties configured. See

page 287 in the QTP 11 User's Guide for a detailed explanation of this concept.
10. After modifying the object, click OK to close the window.

Optionally, you may want to update any existing objects in your script that have already been learned

by modifying the object properties and values as the appear in the Object Repository to make sure

those objects are in 'sync' with the new identifcation properties for that particular object class.

For a more in-depth tutorial on performing the above steps, please refer to Chapter 7 - Configuring

Object Identification starting on page 283 of the QTP 11 User's Guide.

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on April 5, 2013 3:34 pm
0
Private answer

Alternatively to the great write up by Rich you can also use discriptive programming for the objects that change. Discriptive programming gives you a lot more control and bypasses the repository but makes writing scripts a little harder.

http://mercuryquicktestprofessional.blogspot.com/2006/11/descriptive-programming-simplified.html

Marked as spam
Posted by (Questions: 3, Answers: 12)
Answered on April 5, 2013 4:26 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top