Forum Discussion

trajmo's avatar
trajmo
Occasional Contributor
5 years ago
Solved

Creating Event Handlers for TestComplete Events

Hello,   I was following the link: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/handling-events/creating-handlers/for-testcomplete-events.html, for creating an event hand...
  • tristaanogre's avatar
    tristaanogre
    5 years ago

    That's not how event handlers are triggered.  An event is something that automatically happens by TestComplete.  The script code you created will be triggered when the event occurs.  Firing it manually as you have will not work as it is dependant upon particular objects being present.  When the event is fired, the LogParams object is created with all the proper fields and methods.

    If you followed the steps for generating the event and linking it, then your code should work simply when the event is triggered.