public AutomationElement FindItemByProperty(AutomationElement startAfter, AutomationProperty property, object value)
{
try
{
return AutomationElement.Wrap(
this._pattern.FindItemByProperty(
(startAfter == null) ? null : startAfter.NativeElement,
(property == null) ? 0 : property.Id,
Utility.UnwrapObject(value)));
}
catch (System.Runtime.InteropServices.COMException e)
{
Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; }
}
}