Forum Discussion

15 Replies

  • Oferv's avatar
    Oferv
    Super Contributor
    Hi Hellen,Robert,



    sorry but i'm still experiencing the same issue.



    the application is closing but he process is still running in the task manager and Tc is unable to close  or terminate it



    here is the function i'm using to exit the application




    function Exit()

      {    

      Log["AppendFolder"]("Start exit")

         // Obtains the App.exe process 

        var Process = Sys["Process"]("App");

        //Moves the mouse cursor to the menu item specified and then simulates a single click.

        Aliases["App"]["HwndSource_MainWindow"]["MainWindow"]["Grid"]["TabControl"]["Grid"]["DockPanel"]["Menu"]["WPFMenu"]["Click"]("File|Exit")

        Delay(20000,"Give some time for the App.exe process to close") 

        // Kill the process if didn't close by using File-->Exit

        if (Process["Exists"])

          { 

          Log["Warning"]("App process is still running.It will be force to close now")

          //Close App process

          Process["Close"]();    

          //If process still running

            if (Process["Exists"]) 

            {

            Log["Warning"]("App process is still running.It will be terminate now")            

            Process["Terminate"]();

            }

          }

        else

          Log["Message"]("App exit properly")

      Log["PopLogFolder"]()    

    }   




    what else can i do?



    thanks
  • shaz_ilyas's avatar
    shaz_ilyas
    New Contributor
    Hi 



    I am experiencing the same issue with IE 9 , close method don't seems to work... so I have to click  LOGOUT link button again and again to 

    restart my tests......







    please advise for the web applications as well. much appreciated.







    regards

    Shaz

  • Hello,



    to Ofer: please see our reply via e-mail and continue working with Jay on this issue. 



    to Shaz: TestComplete 9 has been released. Update to this version and check whether the issue persists.
  • tinauser's avatar
    tinauser
    Frequent Contributor
    I don´t know if the issue is the same: I use the "Close" method of a testedapp item, end it returns "true": but the application is not closed at all (the window is still there).
  • Hi Lorenzo,



    Please see Julia's reply in this thread.



    In the future, please avoid cross-posting as it makes difficult to give consistent answers and coordinate solutions. Thanks!