Event Handling Sample

Applies to TestComplete 15.49, last modified on March 17, 2023

The Event Handling sample demonstrates the use of event handling in TestComplete.

This sample is a part of the additional sample package. To use it, download this package from support.smartbear.com/testcomplete/downloads/samples and install it.

After the installation is over, you can find the sample in the <TestComplete 15 Samples>\Common\Event Handling\Scripts folder.

The main script posts messages of different types to the test log, launches Windows Notepad, opens the About box, and then closes it. Event handlers that are defined in the script perform additional actions once the corresponding events occur. For instance, the handler of the OnLogError event changes the priority of the posted message, while the handler of the OnUnexpectedWindow event saves the screenshot of Notepad’s About box, which TestComplete treats as an unexpected window.


TestComplete project suites

<TestComplete 15 Samples>\Common\Event Handling\Scripts

See Also

TestComplete Samples
Handling Events
Tutorials and Samples
Video Tutorials (web)

Highlight search results