Forum Discussion
Hi Matthew,
As far as I understand, you are using a Connected application, and this application is working with the Integration object which provides access to the TestComplete COM model. In the Connected application, you need to catch error messages posted to the TestComplete log. If my understanding is correct, you can use the following approach:
1. In TestComplete, create an event handler for the OnLogError event (see the "OnLogError Event" help topic ( http://www.automatedqa.com/support/viewarticle.aspx?aid=3796 ) for more information). This event handler will be used as a wrapper which will execute your C# code.
2. Create a new class in your C# code.
3. Add a method which will handle the messages to the class.
4. Create an instance of the class.
5. Use the approach described in the "Creating Scripting Objects From Application Objects" ( http://www.automatedqa.com/support/viewarticle.aspx?aid=8050 ) help topic to make the C# object available in your TestComplete script.
6. In the OnLogError event handler, add the corresponding script code which will call the needed method of your C# object and pass the data you need to the object. This will allow you to handle the TestComplete event in your C# code.