shaifali_pandya
12 years agoOccasional Contributor
How to ensure that the Browser has been closed
Example code under help topic "Checking if the Browser Is Running From Scripts"
function Check()
{
if (Aliases.browser.Exists)
Aliases.browser.BrowserWindow.Close();
Browsers.Item(btIExplorer).Run("http://smartbear.com");
}
BUT as we do not plan to use NameMapping, our code is as follows
Line1 if (Sys.Browser(myBrowser).Exists)
Line2 Sys.Browser(myBrowser).Close();
Line3 Browsers.Item(myBrowser).Run(mySiteURL);
above code results in "The browser is already running." on Line3 in case Line2 was executed.