Forum Discussion

googleid_109376's avatar
googleid_109376
Occasional Contributor
12 years ago

How can I know which object threw the object does not exist exception?

Hello,



I would like to know which object threw the object not found exception using the OnLogError event like this:




function GeneralEvents_OnLogError(Sender, LogParams)


{


        if(LogParams.MessageText == "The object does not exist. See Additional Information for details.")


         {


                 LogParams.MessageText = "The object " + Sender + " does not exist. The test will be stopped."


                 Runner.Stop(true);


         }

}






Is it possible to know it using the Sender argument? 


  • Hi,


     


    As far as I know, there is no way to do this. Did anybody try to overcome this?


     


    BTW, your code repeats the process that TestComplete usually does when it cannot find the object. Why don't you want to use TestComplete's implementation?