Forum Discussion

Theia's avatar
13 years ago

How to refresh/reload the Browsers collection?

Hi,



is there a solution for refreshing/reloading the Browsers object (collection of all supported browsers that are available on the current computer) after installation of a new browser during a test execution?



I have a loop in TestComplete where I do the following (most parts are solved with js and added with Run script Routine):

1. Read browsers to be installed from a config txt file

2. install 1st browser from the list (Loop object from TestComplete used)

3. execute a web test

4. uninstall previously installed browser

start from 2 again (install 2nd browser from the list)

...



This works for the 1st browser but the 2nd browser start-up (Run Browser) exists in external exception: E06D7363

This is due to the Browsers object collection which obviously does NOT refresh. The Collection is created when I use the Browers object the first time, this is during installation of the first browser in the loop.



The part where i start the browsers is:

function RunBrowser(p_Browser)

{

  var browser;

  for (var i=0; i < Browsers.Count; i++)

  {

    browser = Browsers.Item(i);

    if(aqString.Find(browser.Description, p_Browser, 0, false) != -1)

    {

      browser.Run();

    }

  }

}



When i debug the function i can see that the Browsers collection is not refreshed but instead remains the same after first browser installation.

1 Reply

  • Anonymous's avatar
    Anonymous

    Hi Sma,



    As far as I know, our R&D team has confirmed this issue, and it's fixed in TestComplete 9.10.



    BTW, the Browser object is new in TestComplete. It was added only to TestComplete 9.0 to provide a new possibility for the cross-browser testing. What do you think about this new feature?