Forum Discussion

prabhakarkallam's avatar
prabhakarkallam
Occasional Contributor
8 years ago

Unable to see Java swing objects under process(java) in Testcomplete

Hi,

    One Java Application is running,i am not able to see all the swing objects of this process in TestComplete.

 

   it shows only names but not form names with controls all the stuff,please help me on this

 

  iam in restricted user,so that iam not able to find the swing objects.

 

 please let me know the solution for this

 

Regards,

prabhakar k.

3 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    Is your AUT is Web start application and Desktop standalone application?

     

    If your application is Web start then you will be seeing all the objects under jp2launcer.

    If your application is Desktop standalone then you will be seeing all the objects under java or javaw.

    • prabhakarkallam's avatar
      prabhakarkallam
      Occasional Contributor

      Hi Shankar,

                         it is java desktop standlone application,iam able to see java swing objects under java in object browser when i open testcomplete,but if i open test complete using Psexec,exe -i -s -d "c:programfiles(x86)\smartbear\testcomplete12\bin\testcomplete.exe",i am able to see java swing objects.

       

      but here main problem is iam trying to automate java application using c# using two libraries(automatedqa.script.dll,automatedqa.testcomplete.dll),please find the below given code.

       

       Connect.RunTest("TestProjectRefsLogs", "TestProjectRef", @"C:\Users\\Documents\PattabiSamples\TinyFrameworkLibrary\TinyFrameworkLibrary\TestProjectRef\TestProjectRef.pjs");

       

       

      workflowHost = Connect.Sys["Process"]("java");
      if (workflowHost["Exists"])
      {

      PropArray = new var(new string[] { "JavaClassName" });
      ValuesArray = new var(new string[] { "ComboBoxDemo2" });
      panel = workflowHost["Find"](PropArray,ValuesArray,30000);

      if (panel["Exists"])
      {

      }

      }

       

      please let me know why it is like that

      • shankar_r's avatar
        shankar_r
        Community Hero

        What error you are getting with that code?.

         

        Can you try below code.

         

        workflowHost = Connect.Sys["Process"]("java");
        if (workflowHost["Exists"])
        {
        
              PropArray = new Array("JavaClassName");
              ValuesArray = new Array("ComboBoxDemo2");
        
              panel = workflowHost["Find"](PropArray,ValuesArray,30000);
        
              if (panel["Exists"])
              {
                    Log["Message"]("Object exists")
              }
              else
              {
                    Log["Error"]("Object not exists")     
              }
        
        }