예제 #1
0
 public static IEnumerable<AutomationElement> GetAll(AutomationElement window, string prefix = null)
 {
     var res = window.FindAllChildrenByControlType(ControlType.Text);
     if (prefix != null)
         res = res.Where(l => l.Current.AutomationId.StartsWith(prefix));
     return res;
 }
예제 #2
0
 public static IEnumerable<AutomationElement> GetAll(AutomationElement window)
 {
     var res = window.FindAllChildrenByControlType(ControlType.ComboBox);
     return res;
 }
예제 #3
0
 public static IEnumerable<AutomationElement> GetAll(AutomationElement window)
 {
     var tbs = window.FindAllChildrenByControlType(ControlType.Button);
     return tbs;
 }
예제 #4
0
 public static GuiMenuItem GetFirstMenuItem(AutomationElement window)
 {
     AutomationElement automationElement = window.FindAllChildrenByControlType(ControlType.MenuItem).First();
     return new GuiMenuItem(automationElement);
 }