本文整理汇总了C#中System.Windows.Automation.AutomationElement.FindChildByControlTypeAndAutomationId方法的典型用法代码示例。如果您正苦于以下问题:C# AutomationElement.FindChildByControlTypeAndAutomationId方法的具体用法?C# AutomationElement.FindChildByControlTypeAndAutomationId怎么用?C# AutomationElement.FindChildByControlTypeAndAutomationId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Automation.AutomationElement
的用法示例。
在下文中一共展示了AutomationElement.FindChildByControlTypeAndAutomationId方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTextBox
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;
}
示例2: GetUserControl
public static GuiUserControl GetUserControl(AutomationElement window, string name)
{
_automationId = name;
_currentParentWindow = window;
AutomationElement ele;
ele = window.FindChildByControlTypeAndAutomationId(ControlType.Custom, name);
return new GuiUserControl(ele);
}
示例3: GetTabByAutomationId
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;
}
示例4: Find
public static GuiComboBox Find(AutomationElement window, string automationId)
{
var res = window.FindChildByControlTypeAndAutomationId(ControlType.ComboBox, automationId);
return new GuiComboBox(res);
}
示例5: GetButtonByAutomationId
public static GuiButton GetButtonByAutomationId(AutomationElement window, string automationId)
{
var res = window.FindChildByControlTypeAndAutomationId(ControlType.Button, automationId);
return new GuiButton(res, automationId);
}
示例6: GetExpanderByAutomationId
public static GuiExpander GetExpanderByAutomationId(AutomationElement window, string automationId)
{
var res = window.FindChildByControlTypeAndAutomationId(ControlType.Group, automationId);
return new GuiExpander(res, automationId);
}
示例7: GetRadioButtonByAutomationId
public static GuiRadioButton GetRadioButtonByAutomationId(AutomationElement window, string automationId)
{
AutomationElement res = window.FindChildByControlTypeAndAutomationId(ControlType.RadioButton, automationId);
return new GuiRadioButton(res);
}
示例8: GetLabel
public static GuiLabel GetLabel(AutomationElement window, string automationId)
{
var res = window.FindChildByControlTypeAndAutomationId(ControlType.Text, automationId);
return new GuiLabel(res);
}