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