Chrome - Unable to navigate
I have script that closes all browsers, opens Chrome and then navigates to a URL;
while (Sys.FindChild("ObjectType", "Browser").Exists) {
Log.Message("Found a browser calling Terminate");
Sys.FindChild("ObjectType", "Browser").Terminate();
Sys.Refresh();
}
Browsers.Item(btChrome).RunOptions = "--incognito --disable-session-crashed-bubble --disable-infobars --disable-password-generation --clear-token-service --ignore-autocomplete-off-autofill";
Browsers.Item(btChrome).Run();
OpenBrowser("Chrome");
Sys.Browser().BrowserWindow(0).Maximize();
Browsers.CurrentBrowser.Navigate("https://url.to.where.I.go", -1);
Browsers get closed nicely, Chrome is opened nicely and maximizes. However the Navigate url results in the Browser and not doing anything and the TC monitor shows "Waiting for page('*')".
When it gets like that I have to kill TestComplete (closing makes it hang) and then in Task Manager kill all related processes.
What is causing that? Why does TC decide randomly to not navigate to the URL?