Winforms object is different to the previous time when the script is written
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;
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.
Solved! Go to Solution.
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...
[Hall of Fame]
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
Vegas Thrill Rider
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.
SmartBear Community and Education Manager