public static bool IsDifferent(AutomationElement ele1, AutomationElement ele2)
{
bool retVal;
if (ele1 == null || ele2 == null)
{
return true;
}
try
{
retVal = !Automation.Compare(ele1.GetRuntimeId(), ele2.GetRuntimeId());
}
catch
{
retVal = true;
}
Log.Debug(retVal ? "YES" : "NO");
return retVal;
}