コード例 #1
0
ファイル: GuiLabel.cs プロジェクト: gouzhiyuan/clicktest
 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
ファイル: GuiComboBox.cs プロジェクト: gouzhiyuan/clicktest
 public static IEnumerable<AutomationElement> GetAll(AutomationElement window)
 {
     var res = window.FindAllChildrenByControlType(ControlType.ComboBox);
     return res;
 }
コード例 #3
0
ファイル: GuiButton.cs プロジェクト: gouzhiyuan/clicktest
 public static IEnumerable<AutomationElement> GetAll(AutomationElement window)
 {
     var tbs = window.FindAllChildrenByControlType(ControlType.Button);
     return tbs;
 }
コード例 #4
0
ファイル: GuiMenuItem.cs プロジェクト: gouzhiyuan/clicktest
 public static GuiMenuItem GetFirstMenuItem(AutomationElement window)
 {
     AutomationElement automationElement = window.FindAllChildrenByControlType(ControlType.MenuItem).First();
     return new GuiMenuItem(automationElement);
 }