예제 #1
0
 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;
     }
 }
예제 #2
0
        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));
            }
        }