Forum Discussion

srikanth2801's avatar
srikanth2801
Contributor
14 years ago

Swing windows is not identifying in java application.

hi,



we are testing the java application.



in that after launching the application testcomplete is not identifying the swing windows.



most of the times TC is able to identify them, but some times it is not. we got some problems regarding this issue while running the regression.



it is not showing any swing windows under the process object in Object Browser.



if we click any of the swing object inthat window then it is identifying the objects and it is running without any problems.



Thanks in Advance.

7 Replies


  • Hi Srikanth,





    A possible cause of the problem is that the application performs complex calculations when being started and does not respond to TestComplete in a timely manner when the tool tries to get information on the application type. A solution to this case is to increase the value of the 'Method invoke timeout' project option from the default 3000 ms to 10000 ms or 20000 ms. The option can be found in the Open Applications | General options group of the project properties editor. To open the editor, double-click your project node in the Project Explorer panel and switch to the Properties page.





    Let me know whether this helps.
  • Hi,

    after loading the application we are waiting for that window using the waitswingobject method in the swingwindow properties for 120 seconds.



    still it is not populating in the object browser tree.



    only some times this is happened.



    at that point of time, tell me how to make them populate in the object browser to identify those objects.

  • Hi Srikanth,





    1. Have you tried increasing the 'Method invoke timeout' option for your project as I asked in my previous post? Has this helped?





    2. Does the tested application perform complex calculations for a long time when started? How long does the application perform these calculations?


  • gk1970's avatar
    gk1970
    Occasional Contributor
    Same issue is happening with me. it just says 'Waiting for Swing object",even if I give a liberal delay of 30 sec.

    It gets the Java process, like Sys.Process("Java") and then tries to  gets the the Swing object.

    It's an endless wait. I need to stop it after some waiting time. I'm not sure whether WaitProperty would work,because Java Object,I'm able to get.This happens only 1 in 5/6 times.So how to abort the  script run in such cases ?

  • Hi Girish,





    Most probably, you are having another issue. Please reproduce the problem, pack the entire project suite folder and send us the archive directly via the Contact Support form. We will look into your case.
  • gk1970's avatar
    gk1970
    Occasional Contributor
    Hello Team,



    Can I know whether there is a solution for the problem I faced ? Issue #M0077149



    Thanks,

    Girish

  • Hi Girish,





    As far as I know, you have been contacted by Tanya. Were you able to resolve the problem with her help?