TestComplete samples (both built-in and additional) are located in the <Users>\Public\Public Documents\TestComplete 14 Samples folder.
Some file managers display the Public Documents folder as Documents.
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/downloads/testcomplete/samples/ and install it.
After the installation is over, you can find the sample in the <TestComplete 14 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.
Files
TestComplete project suites
<TestComplete 14 Samples>\Common\Event Handling\Scripts
See Also
TestComplete Samples
Handling Events
Tutorials and Samples
Video Tutorials (web)