Forum Discussion
irina_lukina
14 years agoSuper Contributor
Hi Sandro,
Basically, the approach depends on the TestComplete version you are using. For instance, in the latest version of the product (ver. 9.0), you can close browsers using the new Close method:
browser.BrowserWindow.Close
For more information on this approach, refer to the Closing Browsers help topic.
In previous versions of TestComplete, you can close the browser using the Close button (as you've mentioned), calling the Close method of the corresponding Page object or by terminating the browser process.
BTW, you've said that TestComplete could not find the object. Can you send me the extended error message posted to the Additional Information pane of the test results?
Also, I wanted to clarify the following thing: are you sure the browser is still opened when you call this method from your test?
Thanks :)