cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Contributor

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

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

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/inde...


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
3 REPLIES 3
Community Hero

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

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/inde...


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Manager

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

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. 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Highlighted
Contributor

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

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