Forum Discussion

kandy1984's avatar
kandy1984
Contributor
6 years ago
Solved

Winforms object is different to the previous time when the script is written

Hi,

I have a problem in object regonition everytime i come back to the project a few months later. This script was written a few months ago and today when i try to run the automatic test, TC is complaining that the object cant be identified. Reason being, the object has the word "WinFormsObject" attached infront.

 

Previously, the particular object was identified as below;

 

Aliases.DataAcquisition.MainFrameDA.MdiClient.PaneMDIChild_Active.CanvasUIControl.PaneUIControlFrame.clientArea.LoaderTruckPanelUIControl.splitContainer1.SplitterPanel.LoaderStatusUIControl2.panelCycles.WinFormsObject("panelCyclesBottomRow").WinFormsObject("panelTravelEmpty")

 

Now after a month, the same object is being refered as

 

Sys.Process("DataAcquisition").WinFormsObject("MainFrame").WinFormsObject("MdiClient", "").WinFormsObject("PaneMDIChild").WinFormsObject("CanvasUIControl").WinFormsObject("PaneUIControlFrame").WinFormsObject("clientArea").WinFormsObject("LoaderTruckPanelUIControl").WinFormsObject("splitContainer1").WinFormsObject("SplitterPanel", "", 1).WinFormsObject("LoaderStatusUIControl").WinFormsObject("panelCycles").WinFormsObject("panelCyclesBottomRow").WinFormsObject("panelTravelEmpty")

 

The software that is being tested has not changed much so im not sure why the object is not regonised the same way as before when the script was written.

 

Thanks for helping me.

 

Sudha

 

  • Without knowing the full details, my best guess is that the properties being used for identifying the objects are dynamic.  Meaning, each time the application is run, certain property values change and those values are being used to identify the object. 

     

    You need to start working your way through the tree of objects and evaluate the properties being used.  Add new ones, use wildcards, use conditional mapping, etc., to build a more robust NameMapping repository.

    Extensive information on editing name mapping can be found at https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Without knowing the full details, my best guess is that the properties being used for identifying the objects are dynamic.  Meaning, each time the application is run, certain property values change and those values are being used to identify the object. 

     

    You need to start working your way through the tree of objects and evaluate the properties being used.  Add new ones, use wildcards, use conditional mapping, etc., to build a more robust NameMapping repository.

    Extensive information on editing name mapping can be found at https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html

    • TanyaYatskovska's avatar
      TanyaYatskovska
      SmartBear Alumni (Retired)

      Hi kandy1984,

       

      In addition to Robert's reply, start exploring the Sys.Process("DataAcquisition") object. TestComplete doesn't recognize that it's mapped. Check the Name Mapping properties for the process and compare them with the ones you see in the Object Browser. 

      • kandy1984's avatar
        kandy1984
        Contributor

        Thank you all for replying. I think the problem is that the object was not mapped. Now its mapped and its working properly now.