当前位置: 首页>>代码示例>>C#>>正文


C# UITestControl.Find方法代码示例

本文整理汇总了C#中UITestControl.Find方法的典型用法代码示例。如果您正苦于以下问题:C# UITestControl.Find方法的具体用法?C# UITestControl.Find怎么用?C# UITestControl.Find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UITestControl的用法示例。


在下文中一共展示了UITestControl.Find方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PinPane

        public void PinPane()
        {
            // Find the explorer main window
            UITestControl anItem = this.UIBusinessDesignStudioWindow;
            anItem.Find();

            // Find the explorer sub window
            UITestControl DocManager = new UITestControl(anItem);
            DocManager.SearchProperties["AutomationId"] = "UI_DocManager_AutoID";
            DocManager.Find();

            // Find the left pane window
            UITestControl DockLeft = new UITestControl(DocManager);
            DockLeft.SearchProperties["AutomationId"] = "DockLeft";
            DockLeft.Find();

            // Find the tab page window
            UITestControlCollection dockLeftChildren = DockLeft.GetChildren()[0].GetChildren();
            //var TabPage = dockLeftChildren.FirstOrDefault(c => c.FriendlyName == "Explorer");
            var TabPage = dockLeftChildren[0];

            // Find the explorer sub window
            UITestControl ExplorerPane = new UITestControl(TabPage);
            ExplorerPane.SearchProperties["AutomationId"] = "UI_ExplorerPane_AutoID";
            ExplorerPane.Find();
            ExplorerPane.DrawHighlight();

            // Find the pin
            UITestControlCollection explorerChildren = ExplorerPane.GetChildren();
            var unpinControl = explorerChildren.First(c => c.FriendlyName == "unpinBtn");
            Mouse.Click(unpinControl);
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:32,代码来源:ExplorerUIMap.Designer.cs

示例2: CloseDebugWindow_ByCancel

 public void CloseDebugWindow_ByCancel()
 {
     WpfWindow debugWindow = GetDebugWindow();
     UITestControl theControl = new UITestControl(debugWindow);
     theControl.SearchProperties.Add("AutomationId", "UI_Cancelbtn_AutoID");
     theControl.Find();
     Mouse.Click(theControl, new Point(5, 5));
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:8,代码来源:DebugUIMap.cs

示例3: GetUpdateButton

 private UITestControl GetUpdateButton()
 {
     UITestControl theControl = this.UIBusinessDesignStudioWindow.UIItemCustom;
     theControl.Find();
     UITestControl updateButton = new UITestControl(theControl);
     updateButton.SearchProperties[WpfTree.PropertyNames.AutomationId] = "UI_AddRemovebtn_AutoID";
     updateButton.Find();
     return updateButton;
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:9,代码来源:VariablesUIMap.Designer.cs

示例4: GetIE

 private UITestControl GetIE()
 {
     UITestControl ie = new UITestControl();
     ie.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";
     ie.SearchProperties[UITestControl.PropertyNames.ControlType] = "Window";
     ie.TechnologyName = "MSAA";
     ie.Find();
     return ie;
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:9,代码来源:ExternalUIMap.Designer.cs

示例5: GetIEBodyText

        public string GetIEBodyText()
        {
            UITestControl ie = GetIE();
            UITestControl subMap = new UITestControl(ie);
            subMap.SearchProperties[UITestControl.PropertyNames.ClassName] = "Internet Explorer_Server";
            subMap.Find();
            UITestControl bodyText = subMap.GetChildren()[0];

            string body = bodyText.GetProperty("InnerText").ToString();
            return body;
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:11,代码来源:ExternalUIMap.cs

示例6: GetExplorerEditBtn

        public UITestControl GetExplorerEditBtn()
        {
            // Find the explorer main window
            UITestControl anItem = this.UIBusinessDesignStudioWindow.UIExplorerCustom;
            anItem.Find();

            // Find the explorer sub window
            UITestControl explorerMenu = new UITestControl(anItem);
            explorerMenu.SearchProperties["AutomationId"] = "Explorer";
            explorerMenu.Find();

            UITestControl serverDDL = new UITestControl(explorerMenu);
            serverDDL.SearchProperties["AutomationId"] = "UI_ExplorerEditBtn_AutoID";
            serverDDL.Find();
            return serverDDL;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:16,代码来源:ExplorerUIMap.Designer.cs

示例7: CacheComponentFound

 private static void CacheComponentFound(UITestControl control, string name)
 {
     control.Find();
     if (!control.Exists)
     {
         throw new Exception(CONTROL_NOT_FOUND_EXCEPTION);
     }
     _cache.Add(name, control);
 }
开发者ID:LancelotOrz,项目名称:RequirementManagementSystem,代码行数:9,代码来源:Robot.cs

示例8: GetIntellisenseItem

        // Intellisense Box
        public UITestControl GetIntellisenseItem(int id)
        {
            // Get the Studio
            WpfWindow theStudio = new WpfWindow();
            theStudio.SearchProperties[UITestControl.PropertyNames.Name] = TestBase.GetStudioWindowName();
            theStudio.SearchProperties.Add(new PropertyExpression(UITestControl.PropertyNames.ClassName, "HwndWrapper", PropertyExpressionOperator.Contains));
            theStudio.WindowTitles.Add(TestBase.GetStudioWindowName());
            theStudio.Find();

            UITestControl itelliList = new UITestControl(theStudio);
            itelliList.SearchProperties[WpfControl.PropertyNames.AutomationId] = "PART_ItemList";
            itelliList.Find();

            var itelliListItem = itelliList.GetChildren()[id];
            return itelliListItem;
            //PART_ItemList
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:18,代码来源:WorkflowDesignerUIMap.cs

示例9: WaitForControl

 /// <summary>
 /// Waits for control to exist, be enabled, and ready
 /// </summary>
 /// <param name="control">Target UITestControl</param>
 public static void WaitForControl(UITestControl control)
 {
     control.Find();
     control.WaitForControlExist();
     control.WaitForControlEnabled();
     control.WaitForControlReady();
 }
开发者ID:rangaabyeti,项目名称:HoneywellFirst,代码行数:11,代码来源:xBrowser.cs

示例10: ClearSearch

        public void ClearSearch()
        {
            // Base control
            UITestControl theControl = UIBusinessDesignStudioWindow.UIDebugOutputCustom;
            theControl.Find();

            // Sub button
            var srchBtn = new UITestControl(theControl);
            srchBtn.SearchProperties.Add("AutomationId", "UI_DataListSearchtxt_AutoID");
            srchBtn.Find();

            // The clicking is a bit slow for some reason - Need to investigate
            Mouse.Click(srchBtn);
            Keyboard.SendKeys("^a");
            Keyboard.SendKeys("{DELETE}");
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:16,代码来源:OutputUIMap.cs

示例11: ClickClose

        public void ClickClose()
        {
            // Base control
            UITestControl theControl = UIBusinessDesignStudioWindow.UIDebugOutputCustom;
            theControl.Find();

            // Sub button
            var closeBtn = new UITestControl(theControl);
            closeBtn.SearchProperties.Add("AutomationId", "closeBtn");
            closeBtn.Find();

            // The clicking is a bit slow for some reason - Need to investigate
            Mouse.Click(closeBtn);
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:14,代码来源:OutputUIMap.cs

示例12: getControl

 UITestControl getControl(ControlType controlType, BrowserWindow browser, string buttonId)
 {
     UITestControl button = new UITestControl(browser);
        button.TechnologyName = "Web";
        var controlTypeString = controlType.ToString();
        button.SearchProperties.Add("ControlType", controlTypeString);
        button.SearchProperties.Add("Id", buttonId);
        var buttons = button.FindMatchingControls();
        button.Find();
        return button;
 }
开发者ID:Jassbrain,项目名称:jassplan,代码行数:11,代码来源:JpBigTest.cs

示例13: GetWorkflowNotSavedButtons

        private UITestControlCollection GetWorkflowNotSavedButtons(string windowTitle = "Workflow not saved...")
        {
            // Workflow not saved...
            UITestControl theWindow = new UITestControl();
            theWindow.TechnologyName = "MSAA";
            theWindow.SearchProperties["Name"] = windowTitle;
            theWindow.SearchProperties["ControlType"] = "Window";
            theWindow.Find();
            UITestControlCollection firstChildren = theWindow.GetChildren();

            var ctrls = firstChildren.Where(c => c.ClassName == "Uia.Button");

            UITestControlCollection saveDialogButtons = new UITestControlCollection();
            foreach(UITestControl control in ctrls)
            {
                saveDialogButtons.Add(control);
            }

            return saveDialogButtons;
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:20,代码来源:TabManagerUIMap.Designer.cs


注:本文中的UITestControl.Find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。