Forum Discussion

nwang66's avatar
nwang66
Contributor
14 years ago

TestComplete 8.0 is stuck

Hi,



    This is happening almost every day! I have a TC 8 project to test windows application. I want to check if an object exists, so I have following script,

    If (Sys.Process(“ESG_CSIS”).WaitChild(“*ugManu*”, -1)

 


    I am going to call Exist(), then TC is stuck. The only thing that I can do is using task manager to kill TC process. After reboot my computer, run TC and edit my script, at same step, TC is stuck again. Checking Task Manager, TC used about 450MB memory. I have 3.2 GB memory. It seems my computer is good enough to run TC 8. In addition, when TC is stuck, I am still ok to run other applications, such as IE Browser, Notepad, and my tested application. My project was created in TC 7 and worked fine.



    TC 8 is also stuck in some other scenarios...

 



     Thanks a lot!



Nancy Wang

3 Replies

  • Hi Nancy,



    First of all, note that you're using an infinite timeout in WaitChild (-1). In this case, if TC is unable to find the target object, your test will not continue. You need to set a specific timeout (about 10 seconds should do).



    Second, WaitChild is useless in most cases. You need to use other Wait methods. Look at your object in the Object Browser and check how it is recognized. Then, use the appropriate method (WaitWindow for 'Window', WaitPanel for 'Panel', WaitWinFormsObject for 'WinFormsObject', etc.). If "ugManu" is a part of the name from Name Mapping, use WaitNamedChild or WaitAliasChild depending on whether you address your objects via NameMapping or via Aliases (check its MappedName property to find this out).
  • Hi, Jared,  



          You are right, after removing this infinite waiting time, so far I didn’t have TC stuck error.  Now I have another question. I modified my code to this,


           if (Sys.Process("ESG.CSISAPP"). WaitWinFormsObject("frmManualDialList", 600).Exists)      

                code A

         else     

               code B

     


      The win form “frmManualDialList” existed and was open, but TC thought it didn’t and executes code B. 


       I found in Object Browser pane (Basic view), this windows form didn’t have Exists properties or method. Why some win objects don't have exists method?



       Thanks!



    Nancy

  • Hi Nancy,



    600 milliseconds is quite a small timeout. Try increasing it to at least 5 seconds (5000). As for the Exists property, any object displayed in the object tree has it. This property just not shown in the Basic view (but it still works).