Forum Discussion
3 Replies
- irina_lukinaSuper 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 :)
- sandro_figueireOccasional ContributorHi Irina,
this is the message:
You are trying to call the "Close" method or property of the
"TabButton("GVT")" object that does not exist.
I'm trying to work around this with delay... - irina_lukinaSuper Contributor
Hi Sandro,
Usually, TestComplete shows this message when the specified object doesn't exist in the system. So, if you're sure that it must exist or it will appear soon, you can use the approaches described in the Waiting for an Object, Process or Window Activation help topic.
Does this information help?