public void ReloadElementData(DataGridView grid, TestObjectNurse nurseObject) { UIATestObject existingObject = (UIATestObject) nurseObject.TestObject; if (existingObject.AutomationElement == null) { MessageBox.Show("Cannot load object"); } UIATestObject newObject; newObject = UIAUtility.CreateTestObject(existingObject.AutomationElement, nurseObject.NodeName); foreach (string key in newObject.Properties.Keys) { if (!existingObject.Contains(key)) { string displayName = ControlKeysManager.GetDisplayString(key); string property = newObject.Properties[key]; grid.Rows.Add(new object[] { displayName, property }); } } }