Forum Discussion

madhavisri01's avatar
14 years ago

Window Recognition problem


I am working on Windows based application.Its main window is recognised as Window("Afx:002F0000:8:00010003:00000000:00B","JDTLink").

Looks like Testcomplete is unable to recognise the window.I have enabled MSAA but still I get the same.I know this is not the standard recognition.Is there anyway that I can recognise the window properly?Please help.



7 Replies

  • Hi,

    This seems to be correct. How do you expect TC to recognize this window?
  • TC is recognising the window as ("Afx:002F0000:8:00010003:00000000:00B","JDTLink").Looks like afx indicates that it is custom control/window.I have tried you using another tool on application and it recognises the window as window("Canvas[DSNconnection]","JDLink")

    Can we do custom mapping or something inorder to get the actual recognition string?


  • Hi,

    'Afx:*' is the window class which TC retrieves from your application. Normally, C++ applications which use ATL have such window classes, so, this object name is correct in terms of TC's window recognition system - windows are recognized by the window class, window caption, and index. These parameters are obtained directly from the target window, TC doesn't generate them, so, in TC, you get what you have in your application.

    See the "Naming Windows" help topic.
  • coded in c#.

    I tried to pass object mpanel to the function findTxnLink but object is not recognised. error say object doesn't recognised.  wheather I am implemented correctly. I am in process of creating in gendralised function. I have to put findTxnlink function is seperate unit. I tried with useunit also same result is persist. guide me how to resolve this problem.

    function findTxnLink(mpanel, objectid)


        Log["Message"]("pass into condition stmt1");        

        var Props, Values, w;


        // Creates arrays of property names and values

        Props = new Array("ObjectType", "ObjectIdentifier");

        Values = new Array("Link", "objectid");

          Log["Message"]("pass into condition stmt2");    

        // Searches for the linknode select that item

        w = mpanel["FindChild"](Props,Values, 3);


         Log["Message"]("pass into condition stmt3");    



    function test()


      var iexplore;

      var frame;

      var form;

      var panel;

      var textbox;

      var table;

      var mpanel;


      iexplore = Aliases["iexplore"];

      frame = iexplore["pageMiserBa"]["applicframe"]["mainframe1"];

      form = frame["Mainmenuform"];

      panel = form["Txntreepanel"];

      mpanel = panel["panelMenutxndiv"]["menupanel"];

         c=findTxnLink(mpanel, "Node0");



  • Hi

        Can u suggest me what is best way to capture all the objects in single shot.  Is it possiable way in TC. or suggest me the best to capture the objects from application.
  • Hi,

    Use the FindAll method. See the "FindAll Method" help topic.