コード例 #1
0
ファイル: GuiButton.cs プロジェクト: gouzhiyuan/clicktest
 public static GuiButton GetButton(AutomationElement window, string name)
 {
     AutomationElement res;
     if (name == "Close")
         res = window.FindChildByControlTypeAndAutomationIdAndName(ControlType.Button, "button", name);
     else
         res = window.FindChildByControlTypeAndName(ControlType.Button, name);
     return new GuiButton(res, name);
 }
コード例 #2
0
ファイル: GuiMenuItem.cs プロジェクト: gouzhiyuan/clicktest
 public static GuiMenuItem GetMenuItem(AutomationElement window, string name)
 {
     AutomationElement res;
     if (name == "Close")
         res = window.FindChildByControlTypeAndAutomationIdAndName(ControlType.MenuItem, "menuitem", name);
     else
         res = window.FindChildByControlTypeAndName(ControlType.MenuItem, name);
     return new GuiMenuItem(res);
 }