Micro Focus QTP (UFT) Forums
"Cannot identify object" on an object that used to be recognized - 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: "Cannot identify object" on an object that used to be recognized (/Thread-Cannot-identify-object-on-an-object-that-used-to-be-recognized)



"Cannot identify object" on an object that used to be recognized - amm - 07-30-2010

Hi,

I am working with a test that someone wrote a month or two ago using QTP 10. The test used to run just fine on her pc until recently. It now consistently fails (still running on her pc) on the following line:

Code:
Window("AppName").Window("Tool").WinObject("WindowsForms10.SysListView32.a").Click 44,28
The Run Error is:

Cannot identify the object "WindowsForms10.SysListView32.a" (of class WinObject).

I re-recorded the "Click" action to check the properties of the newly recorded object against the object that had been working until recently and found the only difference to be the regexpwndclass property. The alphanumeric at the end of the property's value is different now.

Can someone please explain why this is the case? Also, other than re-recording a test when this situation arises, what can I do differently so that the test consistently functions from here forward?

One last related question. I have seen this issue happen in other tests when a test developed on one pc is run on a different pc. Why is this happening and how can I prevent it from doing so?

Thank you very much for your help.
amm


RE: "Cannot identify object" on an object that used to be recognized - Jackomcnabb - 07-31-2010

With out seeing your Object I can't give you the full reason as to why it is not working, but one thing I will say is you should not use the Click "44,28" as this is just clicking on a location on a screen and as you have seen that once a your PC environment changes or you use a new PC the script has will cause you issues. You really need to look at the Object and try to code on what you are Clicking... thus you need to get out re-recording and start using the expert view and miniplulating the Object repositories.