I am working on QTP 9.0 with bpt and java addin. My application is windows based application developed in java. My problem is when I add the object in the object repository it is storing. When I am going to add another object (Same Class) from another window it is point to the first object. But I when iam trying the option of "Locate in Repository" it is locating the sameobject in repository for both the objects in application. This is happening for all the object. Why this is happening. how to avoid this?
I have come across such instances in the past where 2 different objects of the same type on 2 different pages sometimes point to the same object in the OR..
(One of the eg. I had 2 link objects with totally different names but a few common properties which forced the OR to recognise them as the same)
Best way to avoid this is to use DP where you define the properties clearly so that QTP is able to differentiate between them..
Add the first object to the OR, go to obj properties and select a few more properties from the list to clearly define the object and rename it.
Now add second object and select the properties from the list that will force the OR to differentiate it from the first object