Forum Discussion

pashooo's avatar
pashooo
Contributor
13 years ago

objects change its names from time to time

Hello.



I was Repeatedly confused  by that the name of objects may changes a little in a couple points, for example when I restart my app... 

I didnt reinstal any new versions of my app.





.Process("OptionsWorkshop").WPFObject("HwndSource: MainForm").WPFObject("MainForm").WPFObject("DockPanel", "", 1).WPFObject("DockingManager").WPFObject("ResizingPanel", "", 1).WPFObject("ResizingPanel", "", 1).WPFObject("DocumentPane", "", 1).WPFObject("OptionsSeriesDesk", "", 1).WPFObject("Grid", "", 1).WPFObject("dataGrid1");



... and it worked!!!



But when I executed the test later, TC says that it couldnt define the object(

So I checked its name and it was:


Sys.Process("OptionsWorkshop").WPFObject("HwndSource: MainForm").WPFObject("MainForm").WPFObject("DockPanel", "", 1).WPFObject("DockingManager").WPFObject("rpMain").WPFObject("rpTop").WPFObject("documentPane").WPFObject("OptionsSeriesDesk", "", 1).WPFObject("Grid", "", 1).WPFObject("dataGrid1");



This problem happens often with different objects.


The same check properties may works in one iterration and says that impossible find object in the second one... and they may start working again after re-writting the property with the same code( how to avoid it?


Sometimes testcomplete says that it couldnt find object, but object spy shows that the name is identical with my code.

Objects which doesnt recognized during checking properties, may be recognized when I use copy-paste and put them in other tests.



...is so unstable operation norm for TC? Does smb faced such problem?

(I didnt reinstal any new versions of my app names shouldnt change)