Forum Discussion

asundar's avatar
asundar
New Contributor
5 years ago

Test complete - IE browser not launching

Hi,

 

I am trying to execute test complete. But my IE browser is not lauched. 

 

I am getting the error "The page '*' was not found".

 

Pleaset help

4 Replies

  • kevin_kapell's avatar
    kevin_kapell
    Frequent Contributor

    I am presuming you are having a problem with IE 11? 

    A function to close browsers and kill processes will help. I have mine run whenever I start the script or need a new browser session.

    However TestComplete still has a bug where the IE process shows under the TestComplete App in the Task Manager. If you pen Task Manager when this happens and expand the TestComplete app that is listed you can see the IE process and kill it from Task Manager. While it happens often I cannot reproduce at will so no fix from SmartBear for it.

    While othere may have a better function this one should work for you.

     

    function CloseBrowserProcess(BrowserProcess)
    {
      Log["Event"]("Starting function CloseBrowserProcess with the browser " + BrowserProcess);
      //This function is used to close a specific browser processes that may still be running after doing a close command
      var process;
      switch(BrowserProcess)
      {
        case "btIExplorer":
        case -1:
        case "iexplore":
          process = Sys.WaitProcess("iexplore",2000);
          break;
       
        case "btChrome":
        case -3:
        case "chrome":
          process = Sys.WaitProcess("chrome",2000);
          break;
        case "btFirefox":
        case -2:
        case "firefox":
          process = Sys.WaitProcess("firefox",2000);
          break;
        case "btEdge":
        case -6:
        case "edge":
          process = Sys.WaitProcess("edge",2000);
          break;
        default:
          Log["Warning"]("Browser process not identified. Value = " + BrowserProcess);
          return false;
      }
     
      if (process.Exists)
      {
        Log.Event("Closing browser");
        process.Close();
        aqUtils.Delay(1000,"Delay for browser to be closed");
        if(process.Exists)
        {
          Log.Event("Terminating browser");
          process["Terminate"]();
        }
      }
      else
      {
        Log.Event("The browser does not appear to be running.");
      }
    }
  • Please make sure you have the web extension enabled. To check this go to File->Install extensions->Click on web. 

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    It might help of you provide us with your code.

    My current guess is that there is already running instance of IE (check with Task Manager) but without visible page been opened (usual case for IE).

    Does your code work if you terminate all IE processes with Task Manager before starting test code?