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


C# WinWindow.Find方法代码示例

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


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

示例1: FormModel

 public FormModel()
 {
     MainWindow = new WinWindow(By.Name("Form1"));
     lbl_ChangingText = MainWindow.Find<WinText>(By.Name("lbl_ChangingText"));
     btn_ChangeTxt = MainWindow.Find<WinButton>(By.Name("btn_ChangingText"));
     txtBox_ChangingBox = MainWindow.Find<WinEdit>(By.Name("txtBox_ChangingText"));
 }
开发者ID:kraidleyaran,项目名称:SampleCodedUI,代码行数:7,代码来源:FormModel.cs

示例2: GetOutlookAfterFeedbackWindow

 private WinWindow GetOutlookAfterFeedbackWindow()
 {
     WinWindow theWindow = new WinWindow();
     theWindow.SearchProperties[WinWindow.PropertyNames.Name] = "Some Real Live Feedback : Feedback - Message (Plain Text) ";
     theWindow.Find();
     return theWindow;
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:7,代码来源:ExternalUIMap.Designer.cs

示例3: GetWindow

        public static WinWindow GetWindow(this WinWindow parent, string windowTitle, bool exactMatch = false)
        {
            PropertyExpressionOperator expressionOperator = exactMatch
                                                                ? PropertyExpressionOperator.EqualTo
                                                                : PropertyExpressionOperator.Contains;
            var modalWindow = new WinWindow
                {
                    SearchProperties =
                        {
                            new PropertyExpression(UITestControl.PropertyNames.Name, windowTitle, expressionOperator)
                        }
                };

            modalWindow.Find();
            return modalWindow;
        }
开发者ID:HighwayFramework,项目名称:Highway.Insurance,代码行数:16,代码来源:WinWindowExtensions.cs

示例4: HtmlInputButton_UsingSearchPropertyWithValueAsKey_Succeeds

        public void HtmlInputButton_UsingSearchPropertyWithValueAsKey_Succeeds()
        {
            //Internet Explorer may display the message: Internet Explorer restricted this webpage from running scripts or ActiveX controls.
            //This security restriction prevents the alert message to appear.
            //To enable running scripts on the local computer, go to Tools > Internet options > Advanced > Security > [checkmark] Allow active content to run in files on My Computer

            //Arrange
            using (var webPage = new TempWebPage(
            @"<html>
            <head>
            <title>test</title>
            </head>
            <body>
            <input type=""submit"" value=""Log In"" onclick=""alert('onclick');""/>
            </body>
            </html>"))
            {
                var browserWindow = BrowserWindow.Launch(webPage.FilePath);

                HtmlInputButton button = browserWindow.Find<HtmlInputButton>(By.ValueAttribute("Log In"));

                //Act
                button.Click();

                if (BrowserWindowUnderTest.GetCurrentBrowser() is InternetExplorer)
                {
                    //read JavaScript alert text
                    WinWindow popup = new WinWindow(By.Name("Message from webpage").AndSearchProperties("ClassName=#32770"));
                    WinText text = popup.Find<WinText>();
                    Assert.AreEqual("onclick", text.DisplayText);
                }

                browserWindow.PerformDialogAction(BrowserDialogAction.Ok);

                browserWindow.Close();
            }
        }
开发者ID:FantasticFiasco,项目名称:cuite,代码行数:37,代码来源:HtmlControlTests.cs


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