Forum Discussion

Rodrigo20's avatar
Rodrigo20
Contributor
10 years ago

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
    10 years ago

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

     

    function closeBrowser()
    {

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

    }

    • 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();

        }