Chrome browser starts with Sad Face

Originally posted by S_Lecault on January 16, 2025

Struggling with existing test scripts starting a Chrome Browser.

The code works fine on my laptop, but other team members have different behaviors.

I use Browsers.item[chrome].Run() to start my browser. Where it fails, Chrome starts, one empty tab page with a sad face. No mather what I try to open on the browser links, new tabs, it is like we have not internet or no priviledge at all.

I did go through configuration steps. The TestComplete extension is colored on Chrome, the TestComplete has Desktop, web amd Mobile Extensions installed and ticked.

Running TestComplete and Testexecute 15.71

on Windows 11 with 125.0.6422

Any suggestions is welcome

Originally posted by Hassan_Ballan on January 16, 2025

Perhaps you can try this code using your correct NameMaping

function Test1()
{
  Browsers.Item(btChrome).Run();
  Browsers.CurrentBrowser.Navigate("https://www.google.com/");
  Aliases.browser.pageGoogle.formSearch.textareaSearch.Keys("TestComplete");
}

Originally posted by S_Lecault on January 16, 2025

your line 3 is exactly how I start the browser, once started, whatever page/url I try, the browser has sad face in the left corner of the tab.

Opening new tabs, or typing urls even manually on the keybords does not get it to work. I need to close Chrome and restart it.

I my browser was manually started, everything works fine. Looks like some sort of rights issue (I am admin on the problematic computer. Test Complete is started via an icon with compatibility set “exec as Admin”

Originally posted by Hassan_Ballan on January 16, 2025

What language is your line? Browsers.item[chrome].Run()

My line is JavaScript “Browsers.Item(btChrome).Run();” and the differences bracket and browser name.

I understand when you start Chrome yourself it works properly, and it only fails when TestComplete run Chrome. Try to run Chrome with “exec as Admin”, do you have same problem? if so can you run TestComplete without the “exec as Admin”?

Originally posted by rraghvani on January 17, 2025

If Python is your chosen language, then the correct call should be either -

Browsers.Item[btChrome].Run("https://www.w3schools.com/"); # Using predefined browser type constants
# OR
Browsers.Item["chrome"].Run("https://www.w3schools.com/"); # Using the browser's file name

Refer to https://support.smartbear.com/testcomplete/docs/general-info/configuring/index.html as you may need to configure your system, depending on your access

Originally posted by S_Lecault on January 17, 2025

Hello,

I’ve been using use Delphi script with TestComplete since 2011 !

my exact line has a variable containing the browser constant like btChrome. I was just refering to how I start the browser.

In order to start the browser as admin, you mean the compatibility of the Chrome Icon, or some parameter within TestComplete?

Originally posted by Hassan_Ballan on January 17, 2025

Hello,

I don’t think it is your command line or TestComplete that are causing the problem. You have the correct Delphi command line and it includes “;” at the end, was it a typo in your message?

Browsers.Item[btChrome].Run;

The Chrome sad face happens when there’s a crash. Try to:

  1. Update Chrome
  2. Kill all Chrome processes and try again
  3. Reset and clean Chrome settings
  4. Uninstall, reboot, and reinstall TestComplete extension
  5. Disable all other extensions
  6. Make sure antivirus is not blocking Chrome
  7. Check for malware

I am referring to the compatibility, same method you use to start TestComplete. As per your statement "Test Complete is started via an icon with compatibility set “exec as Admin”, and not sure why you even need to do that for TestComplete. As a logged in user TestComplete, Browser, and extension should run properly in the same logged in user session.

Hope this is helpful.