Forum Discussion
TanyaYatskovska
Alumni
13 years agoHi,
Is Chrome running when the code is being executed? If it is, that's expected. You won't start the browser if it has already launched. Thus, the CurrentBrowser property will contain null. Try using another script:
function runBrowserAndNavigate () {
//var web_browser = "iexplore";
//var web_browser = "firefox";
var web_browser = "chrome";
// Run the browser
if (Sys.WaitBrowser(web_browser).Exists)
Sys.Browser(web_browser).BrowserWindow(0).Close();
Browsers.Item(web_browser).Run();
Browsers.CurrentBrowser.Navigate("http://osm.org");
}