Forum Discussion

anup_rai's avatar
12 years ago

Error message The object does not exist.


Hi, I am testing an application that is built on ASP.net(C#),



I finished recording some actions for the open the stored file using menu bar(File->Open) or Click on Open button on another menu bar, i tried to run it but it seems like TC could not detect the objects.

here is the information under Additional Information. i tried to debug using help data provided and put a waiting before the operation but this doesn't seem to solve the problem. it seems like the objects are recognized when i record the test but are not recognized when i run the test.

 

For example:

Below mentioned error message is showing on "Additional Info" page for error details



An error occurred while accessing the "CheckItem" method or property of the "Afx" object.

The object or one of its parent objects was not found.



Object Whose Method or Property Was Accessed

Alias: Aliases["GeoEView"]["wndAfx2"]

Name mapping item: NameMapping["Sys"]["GeoEView"]["wndAfx2"]



Object That Was Not Found

Alias: Aliases["GeoEView"]["wndAfx2"]

Name mapping item: NameMapping["Sys"]["GeoEView"]["wndAfx2"]





Sometime when I run the test, test complete can track this object but sometime it can't and then show error that this object are not exists.



 


1 Reply


  • Hi Anup,


     


    As far as I see, you are testing the Visual C++ app. One of the specifics of such apps is that the class name of the windows isn't stable and can change from run to run, for example Afx:400000:b:10008:6:1027b. First of all, make sure that the Tools | Options | Engines | General | Object Naming | Auto-correct Afx window class names option is enabled. Refer to the "Engines - General Options" article for details. Also, I recommend that you go through the "Addressing Objects in Visual C++ Applications" article to learn how to work with Afx objects in TestComplete.