Forum Discussion

Rodrigo20's avatar
Rodrigo20
Contributor
9 years ago
Solved

Closing the current browser/virtual browser on TestComplete 10.60

Hi Guys,  

 

 

I'm running some crossbrowser tests, but when I do that, a lot of browsers and virtual browsers stay opened, how can I close those browsers?

 

I just read this article, but it didn't work: http://support.smartbear.com/viewarticle/59764/ , could you guys explain to me how can I do that? How can I close the current running browser / virtual browser?

 

 

Thank you very much!

  • blacy's avatar
    blacy
    9 years ago

    we wrote a script (called it CloserBrowser) with below code. works fine

     

    function closeBrowser()
    {

    while (Sys.WaitBrowser().Exists)
    Sys.WaitBrowser().Close();

    }

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    What happened when you tried the steps from the article?

    • Rodrigo20's avatar
      Rodrigo20
      Contributor

      I could not find the "BrowserWindow" object as you can see below.

       

       

      browserwindow.png

      • blacy's avatar
        blacy
        Contributor

        we wrote a script (called it CloserBrowser) with below code. works fine

         

        function closeBrowser()
        {

        while (Sys.WaitBrowser().Exists)
        Sys.WaitBrowser().Close();

        }