Solution for changing full name of an object
Sys.Process("YYY").WPFObject("HwndSource: ControlRoot").WPFObject("ControlRoot").WPFObject("DockPanel", "", 1).WPFObject("mainGrid").WPFObject("MenuControlHost").WPFObject("Control_ROOT").WPFObject("Grid", "", 1).WPFObject("Grid", "", 1).WPFObject("ContentControl", "", 1).WPFObject("WeldPortInspectionControl", "", 1).WPFObject("Border", "", 1).WPFObject("Grid", "", 1).WPFObject("TabControlWithCornerElement", "", 1).Click(1635,38)
In the above full the number in the part (WPFObject("TabControlWithCornerElement", "", 1)) keeps changing at runtime or playback. how to handle this?
dmiscannon wrote:
If just the number is changing, replace the number with * which is a wild card to handle situations like this.Normally, I'd suggest this, but that doesn't guarentee that you'll get the CORRECT object. If there's more than one, differentiated only by the index, then using the wildcard will return an ambiguous object recognition warning and, potentially, have the automation fail because the correct object could not be accessed.