public static GuiTextBox GetTextBox(AutomationElement window, string automationId) { if (_cachedtb == null || _cachedtb.AutomationId != automationId) { var tb = window.FindChildByControlTypeAndAutomationId(ControlType.Edit, automationId); _cachedtb = new GuiTextBox(tb); } return _cachedtb; }
public static GuiUserControl GetUserControl(AutomationElement window, string name) { _automationId = name; _currentParentWindow = window; AutomationElement ele; ele = window.FindChildByControlTypeAndAutomationId(ControlType.Custom, name); return new GuiUserControl(ele); }
public static GuiTabItem GetTabByAutomationId(AutomationElement parentWindow, string automationId) { if (_cachedTab == null || _cachedTab.AutomationId != automationId) { var res = parentWindow.FindChildByControlTypeAndAutomationId(ControlType.TabItem, automationId); _cachedTab = new GuiTabItem(res, automationId); _currentParentWindow = parentWindow; } return _cachedTab; }
public static GuiComboBox Find(AutomationElement window, string automationId) { var res = window.FindChildByControlTypeAndAutomationId(ControlType.ComboBox, automationId); return new GuiComboBox(res); }
public static GuiButton GetButtonByAutomationId(AutomationElement window, string automationId) { var res = window.FindChildByControlTypeAndAutomationId(ControlType.Button, automationId); return new GuiButton(res, automationId); }
public static GuiExpander GetExpanderByAutomationId(AutomationElement window, string automationId) { var res = window.FindChildByControlTypeAndAutomationId(ControlType.Group, automationId); return new GuiExpander(res, automationId); }
public static GuiRadioButton GetRadioButtonByAutomationId(AutomationElement window, string automationId) { AutomationElement res = window.FindChildByControlTypeAndAutomationId(ControlType.RadioButton, automationId); return new GuiRadioButton(res); }
public static GuiLabel GetLabel(AutomationElement window, string automationId) { var res = window.FindChildByControlTypeAndAutomationId(ControlType.Text, automationId); return new GuiLabel(res); }