Veroniquelu
10 years agoContributor
Lauching IE not successfully
This might be an old topic, I am using below script to launch IE, but I found sometimes, it can not be done successfully, because the browser is already running while clearly the browser is not launched... Is there any way that I can improve this? I tried other methods before I came up with below script, this is the best solution so far, if I go with other solutions, I am more likely to fail lauching the browser. Even with this one, it fails sometimes with much lower frequency
while (Sys.WaitBrowser().Exists)
Sys.WaitBrowser().Close();
Browsers.Item(btIExplorer).Run();
webPageObj = Sys.Browser("iexplore*").Page("*");
Sys.Browser().BrowserWindow(0).Maximize();
Browsers.CurrentBrowser.Navigate(ProjectSuite.Variables.url)
webPageObj.Wait(10);