Micro Focus QTP (UFT) Forums
QTP Unique Identification of object - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP Unique Identification of object (/Thread-QTP-Unique-Identification-of-object)

Pages: 1 2


QTP Unique Identification of object - minug - 03-02-2010


While running my script,I get the following error
"The "Object Type:" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the obj"

How can I add properties for unique identification of same object?



RE: QTP Unique Identification of object - Cycoman - 03-02-2010

Open the Onject properties by clicking on '+' sign in the Object repository. Select the properties you want to add and click ok...

Hope this helps


RE: QTP Unique Identification of object - minug - 03-02-2010

Yes. I understand that. My confusion is that how I can include that property in my script.For example : If the "attached text or value" is the unique property,How I can include that in my script?


RE: QTP Unique Identification of object - UjwalaK - 03-03-2010

This happens if two objects in the application has similar properties..

You can use object spy and find another property and use it in your application for QTP to recognize it.

Regards,
Ujwala


RE: QTP Unique Identification of object - minug - 03-03-2010

Hi Ujwala,
Yes.I did that.By Object Spy,I got which is the unique property.But how I can include it in script.


RE: QTP Unique Identification of object - UjwalaK - 03-03-2010

You can write VBScript to get it done.

If you need further help on this, let us know what you exactly your application is.


Regards,
Ujwala


RE: QTP Unique Identification of object - minug - 03-31-2010

My application is based on java swing.


RE: QTP Unique Identification of object - UjwalaK - 03-31-2010

Post the piece of code here to suggest you with a better answer.

Regards
Ujwala


RE: QTP Unique Identification of object - bfakruddin - 03-31-2010

Hi,

You can add that unique property in descriptive manner.

Code:
browser("xxx").page("xxx").WebLink("visible:=True,Class Name:=WebLink,Text:=Inbox").Click

Thanks & Regards,
Baba Fakruddin.D


RE: QTP Unique Identification of object - Charleslee - 02-24-2014

Hi,

I hope someone will know the solution to solve my problem.

I am also facing same problem.

I would like to tell detail.

The following lines are written, when i had record the step.

Code:
JavaWindow("NetSim - Simulation -").JavaButton("Router_Blue").Click

(This is while choose router icon (button) from tool bar.)

Then, it would be list out of routers.

Now i have click the router icon in the list.

then following line are written.

Code:
JavaWindow("NetSim - Simulation -").JavaButton("Router_Blue_2").Click

While reply the error comes in first line which i have mentioned in above.
Code:
(JavaWindow("NetSim - Simulation -").JavaButton("Router_Blue").Click)

Then i saw "Blue Router" property in object repository.

There "Blue Router" has nothing.

But "Blue Router_2" has some properties like x, y pos, class name, text and etc.

I don't why "Blue Router" doesn't have anything.

And if i change "Blue Router_2" to first line , then its working fine.

Why it's happen.

Like that i have faced so many place.

Please anyone help me what's problem in that? and how to resolve that?

Regards
Charles J