Forum Discussion

sandro_figueire's avatar
sandro_figueire
Occasional Contributor
13 years ago

Not finding IEclose when running scripts IE9

Sometimes when I'm running my recorded scripts TestComplete can not find the object IEclose(x button) in order to close the browser.



Anyone knows how to force TestComplete to close the browser?

3 Replies

  • irina_lukina's avatar
    irina_lukina
    Super 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_figueire's avatar
    sandro_figueire
    Occasional Contributor
    Hi 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...