cancel
Showing results for 
Search instead for 
Did you mean: 

Chrome - Unable to navigate

Muts
New Contributor

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?

 

4 REPLIES 4
AlexKaras
Community Hero

Re: Chrome - Unable to navigate

Hi,

 

First question: what are versions of TestComplete and Chrome ?

 

> Why does TC decide randomly to not navigate to the URL?

Does it happen really randomly or every time?

If it happens randomly, then (depending on your answer to the first question) I would say that previous instance of Chrome was not shut down completely, TestComplete got its instance and tries to wait for the page been opened in this 'incorrect' process.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Marsha_R
Community Hero
Moved:

Re: Chrome - Unable to navigate

Muts
New Contributor

Re: Chrome - Unable to navigate

Hi,

 

It is totally random.  Sometimes it occurs when executing directly after a reboot.  My 'workaround' is to kill all TC related processes in Task Manager and the relaunch TC.  After 2 or 3 cycles of this, TC eventually starts navigating OK.

 

TC Version: 12.42.3048.7 x64

Chrome: 64.0.3282.140 x64

 

Chrome instances are being terminated fully prior to opening. Also, the times directly after a reboot (where TC and the execution of the test is run as the first thing; no other program or Chrome run prior) have no Chrome beforehand.

 

Please see the code snippet in OP.

 

AlexKaras
Community Hero

Re: Chrome - Unable to navigate

Hi,

 

Out of curiosity...
TC12.40 and up installs two flavors: 32-bit and 64-bit, but the installer creates a shortcut for 64-bit flavor only. What if you try TC 32-bit located in <TestComplete>\Bin\ folder ? Does the same problem exist with TC 32-bit ?

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Top Kudoed Authors