Close Action (Window Objects)

Applies to TestComplete 15.65, last modified on July 17, 2024


This action closes the window if it is a top-level window or an MDI-child window, just as if the Close button had been pressed. It has no effect on popup windows and controls, except that an error message is inserted into the test log.



TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
WaitTimeout [in]    Optional    Integer Default value: 2000   
Result None

Applies To

View Mode

This method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.


The method has the following parameter:


Specifies the number of milliseconds to wait for the window to close. The script execution will pause for the specified time or untill the window closes.

Result Value


See Also

Activate Action

Highlight search results