Exemple #1
0
        public static SearchCriteria ByControlType(Type testControlType, WindowsFramework framework)
        {
            var searchCriteria = new SearchCriteria(SearchConditionFactory.CreateForControlType(testControlType, framework));

            searchCriteria.InferCustomItemType(testControlType);
            return(searchCriteria);
        }
Exemple #2
0
 public static SearchCriteria ByNativeProperty(PropertyId automationProperty, bool value)
 {
     return(new SearchCriteria(SearchConditionFactory.CreateForNativeProperty(automationProperty, value)));
 }
Exemple #3
0
 public static SearchCriteria ByControlType(ControlType controlType)
 {
     return(new SearchCriteria(SearchConditionFactory.CreateForControlType(controlType)));
 }
Exemple #4
0
 public static SearchCriteria ByFramework(string framework)
 {
     return(new SearchCriteria(SearchConditionFactory.CreateForFrameworkId(framework)));
 }
Exemple #5
0
 public static SearchCriteria ByAutomationId(string identification)
 {
     return(new SearchCriteria(SearchConditionFactory.CreateForAutomationId(identification)));
 }
Exemple #6
0
 /// <summary>
 /// Create a SearchCriteria with text
 /// </summary>
 /// <param name="text">For managed applications this is name given to controls in the application code.
 /// For unmanaged applications this is text of the control or label next to it if it doesn't have well defined text.</param>
 /// <returns></returns>
 public static SearchCriteria ByText(string text)
 {
     return(new SearchCriteria(SearchConditionFactory.CreateForName(text)));
 }
Exemple #7
0
        internal static SearchCriteria ForMenuBar(WindowsFramework framework)
        {
            var searchCriteria = new SearchCriteria(SearchConditionFactory.CreateForControlType(typeof(MenuBar), framework));

            return(searchCriteria.NotIdentifiedByText("System Menu Bar"));
        }
Exemple #8
0
 public virtual SearchCriteria AndNativeProperty(PropertyId automationProperty, object value)
 {
     conditions.Insert(0, SearchConditionFactory.CreateForNativeProperty(automationProperty, value));
     return(this);
 }
Exemple #9
0
 public virtual SearchCriteria AndAutomationId(string id)
 {
     conditions.Insert(0, SearchConditionFactory.CreateForAutomationId(id));
     return(this);
 }
Exemple #10
0
 public virtual SearchCriteria AndControlType(ControlType controlType)
 {
     conditions.Insert(0, SearchConditionFactory.CreateForControlType(controlType));
     return(this);
 }
Exemple #11
0
 public virtual SearchCriteria AndControlType(Type testControlType, WindowsFramework framework)
 {
     InferCustomItemType(testControlType);
     conditions.Insert(0, SearchConditionFactory.CreateForControlType(testControlType, framework));
     return(this);
 }
Exemple #12
0
 public virtual SearchCriteria NotIdentifiedByText(string name)
 {
     conditions.Insert(0, new NotCondition(SearchConditionFactory.CreateForName(name)));
     return(this);
 }
Exemple #13
0
 public virtual SearchCriteria AndOfFramework(WindowsFramework framework)
 {
     conditions.Insert(0, SearchConditionFactory.CreateForFrameworkId(framework.FrameworkId()));
     return(this);
 }
Exemple #14
0
 public virtual SearchCriteria AndByClassName(string className)
 {
     conditions.Insert(0, SearchConditionFactory.CreateForClassName(className));
     return(this);
 }
Exemple #15
0
 public virtual SearchCriteria AndByText(string text)
 {
     conditions.Insert(0, SearchConditionFactory.CreateForName(text));
     return(this);
 }
Exemple #16
0
 public static SearchCriteria ByClassName(string className)
 {
     return(new SearchCriteria(SearchConditionFactory.CreateForClassName(className)));
 }