I am trying to compare 2 objects by using the Objects.Compare(AObject, Name, ReportDifference) method. I do not want to store/compare all the properties of the object. I am interested in storing few attributes like name, id and some properties. Will Compare method compares the property available in the store object or it will take all the properties available in the on screen objcet?
Store Object - 5 properties
OnScreen Object - 70 properties.
Compare method - will fail or pass. When i tried, always i am getting failure.
The Compare method ignores properties that are not saved in the Objects collection. So, only the selected properties will be used in comparison.
I suggest that you add only properties that are critical for you to the collection (like the control's text, Enabled, Visible, etc.). Comparison may fail because you have added properties with unstable values (for example, Focused, VisibleOnScreen, the object's screen coordinates, index, etc.)