internal static IUiEltCollection PerformFindAll(this IExtendedModelHolder holder) { try { return((holder as UiExtendedModelHolder).GetParentElement() .FindAll( holder.GetScope(), classic.Condition.TrueCondition)); } catch (Exception) { return(new UiEltCollection(true)); // throw; } }
internal static IUiEltCollection PerformFindAll(this IExtendedModelHolder holder, classic.ControlType controlType) { try { var controlSearcherData = new ControlSearcherData { ControlType = controlType.ConvertControlTypeToStringArray(), InputObject = new IUiElement[] { holder.GetParentElement() } }; var controlSearcher = AutomationFactory.GetSearcherImpl <ControlSearcher>(); return(AutomationFactory.GetUiEltCollection( controlSearcher.GetElements( controlSearcherData, holder.Seconds))); } catch (Exception) { return(new UiEltCollection(true)); } }