Forum Discussion

abdul_rp's avatar
abdul_rp
Contributor
13 years ago

Object Identification Issue

Hi,



We are automating windows based application, The generated code was working fine untill the Microsoft Patch Updated on the PC . After doing that StripMainMenu Object is not identified and the Object WndClass is Showing as "WindowsForms10.Window.8.app.0.378734a" 

 and  the other Objects are identified perfectly fine . I am using 7.52.678.7. I have replaced the tcClrHook.dll as well. But nothing is happening. Kindly help me in resolving the Issue.





Regards,

Abdul
  • karkadil's avatar
    karkadil
    Valued Contributor
    My best guess would be that you are using Windows 64 bits and have replaced only x86 DLL file (see details here).



    Does this help?

  • Hi Abdul,





    It looks like you posted the same screenshot twice. Also, the WndClass shown on the screenshot is OK for a .NET control and, as I see, the StripMainMenu does return some object. So, I'm not sure what problem you actually face. Could you please clarify your request?


  • Hi Allen,



    Issue 1:



    We are using following code to fetch the SubMenu count from one of the Menu, This code was working fine. Till last week . After the .Net Patches updated in our system the following code is not working.we are getting the Jscripts error ( Screenshot is attached)





    var DMMenuCnt = Form["StripMainMenu"]["Items"]("View")["SubMenu"]["Items"]("Deal Manager")["SubMenu"]["Count"];



    Issue 2:



    For Tool Strip Items ClickItem and wItem,wChecked and Other Properties are not displaying/ Supported  after .Net Updates ( Earlier things were working fine)



    I have changed the dll file tcClrHook.dll, Which I have downloaded from AutomatedQA.com Sometimes back, Though the situation is same



    Please help in resolving the issue.



    Regards,

    Abdul Rahim








  • Hi,



    Where as the following is working fine for all the Menu Items, But Not working for View Menu.I am not understanding the problem, Could any one help me to find the solution.


    Working Code



    var DMMenuCnt = Form["StripMainMenu"]["Items"]("Orders")["SubMenu"]["Items"]("Confirmations")["SubMenu"]["Count"];


    DMMenuCnt = Form["StripMainMenu"]["Items"]("Orders")["SubMenu"]["Items"]("Confirmations")["SubMenu"]["Count"];

    ShowMessage(DMMenuCnt)




    Non Working Code



    var DMMenuCnt = Form["StripMainMenu"]["Items"]("View")["SubMenu"]["Items"]("Deal Manager")["SubMenu"]["Count"];


    ShowMessage(DMMenuCnt)




    Regards,

    Abdul Rahim

  • Hi Abdul,







    We are using following code to fetch the SubMenu count from one of the Menu, This code was working fine. Till last week . After the .Net Patches updated in our system the following code is not working.we are getting the Jscripts error ( Screenshot is attached)

    var DMMenuCnt = Form["StripMainMenu"]["Items"]("View")["SubMenu"]["Items"]("Deal Manager")["SubMenu"]["Count"];



    As I see, TestComplete cannot obtain submenu items for some items in the same menu. It's possible that some changes were made to the control's implementation due to the patch installation and therefore TestComplete wrappers do not work properly. Please set a breakpoint on the problematic line and try to examine properties of the menu items returned by Form["StripMainMenu"]["Items"]. Do you see properties populated with the expected values? Could you please post a screenshot showing properties for Form["StripMainMenu"]["Items"]("View")? Also, check whether the problem persists if you click the View menu item first (to make the submenu visible) and then try to obtain the submenu.







    For Tool Strip Items ClickItem and wItem,wChecked and Other Properties are not displaying/ Supported  after .Net Updates ( Earlier things were working fine)

    I have changed the dll file tcClrHook.dll, Which I have downloaded from AutomatedQA.com Sometimes back, Though the situation is same



    Please post a screenshot showing the problematic object's properties (including its full name) here. Also, we need to see how the problematic application is recognized in the Object Browser. The properties might not be available because the application is not recognized as Open.


  • Hi Allen,



    Problem Area 1:



    I have tried getting the Caption for the View menu from the following code, It is returning me the Name of the Menu.


    var DMMenuCnt = Form["StripMainMenu"]["Items"](3)["Caption"]


    DMMenuCnt = Form["StripMainMenu"]["Items"](3)["Caption"]

    ShowMessage(DMMenuCnt)




    When I tried fetching the Value from Submenu It is not returning SubMenu, Rather It is saying the Submenu is Null.





    I have also tried clicking on the  ToolStripDropDownMenu after clicking on View Menu, It is also not working.



    Problem Area 2:



    I have captured the properties in the screenshot.


  • Hi Abdul,



    We need to reproduce this in order to say something for sure. Please contact us via our Contact Support form regarding possible options.



    BTW, in the meantime, as a workaround, you can simulate keystrokes instead of mouse clicks for navigation and menu items selection.
  • Allen,



    I will do that, Though I use Key stores I am not getting the Sub menu Count from View Menu( Problem is Identifying Sub Menus). I will share the application with support team for the resolution.



    Regards,

    Abdul