Forum Discussion

KP13's avatar
KP13
Occasional Contributor
6 years ago

TestComplete event handling

I have created a General Event such as GeneralEvents_OnLogError (Sender, LogParams) ( it's an OnLogError event - Occurs when an error message is posted to the test log) which is being called by both my desktop and web applications, whenever errors occur. I'm capturing the log message in a file by extracting the message using 'LogParams.MessageText'.  Whenever it shows the error as 'The object does not exist. See Additional Information for details', its difficult to get the failure whether happened in Desktop application or Web Application. So, could you please suggest me how I can create a customized function to determine the error happened in Desktop or Web Application.

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    > to determine the error happened in Desktop or Web Application

    Can't this information be obtained from LogParams.AdditionalText?

     

    • KP13's avatar
      KP13
      Occasional Contributor

      Thanks AlexKaras for your reply. I will try and confirm you.

  • cneedham's avatar
    cneedham
    Occasional Contributor

    You could set a project variable then it would be in scope to the event handler... Be careful though... make sure you reset the project variable once you read it if you do that.