Ask a Question

TestedApp.Close doesn't close the application

Oferv
Super Contributor

TestedApp.Close doesn't close the application

Hi,



when trying to close the AUT using the following method http://smartbear.com/support/viewarticle/12380/ th application doesn't close.

anyone know why?



Thanks
15 REPLIES 15
HKosova
SmartBear Alumni (Retired)

Hi Ivan,



Our support engineers are working on your ticket regarding this issue. They will get back to you once they have found the root cause of the problem.

Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
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
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.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
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).
HKosova
SmartBear Alumni (Retired)

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!

Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: