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


C# Window.Get方法代码示例

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


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

示例1: GivenIAmAtANon_BlackLevel

        public void GivenIAmAtANon_BlackLevel()
        {
            _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
            _mainWindow = _application.GetWindow("MainWindow");
            _mainWindow.Get<Button>("goToRedLevelButton").Click();

            var firstPrinciple = _mainWindow.Get<ListBox>("principlesListView").Items[0];
            Assert.That(firstPrinciple.Text, Is.StringContaining(Resource.DoNotRepeatYourself));
        }
开发者ID:PapaMufflon,项目名称:CcdAddIn,代码行数:9,代码来源:Retrospective.cs

示例2: GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel

        public void GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel()
        {
            File.Delete(@"..\..\CcdAddIn.TestHarness\bin\Debug\repository");
            File.Copy(@"..\..\repository21perfectRetrospectives", @"..\..\CcdAddIn.TestHarness\bin\Debug\repository");

            _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
            _mainWindow = _application.GetWindow("MainWindow");
            _mainWindow.Get<Button>("retrospectiveButton").Click();
            _mainWindow.Get<Button>("retrospectiveDoneButton").Click();

            File.Delete("repository");
        }
开发者ID:PapaMufflon,项目名称:CcdAddIn,代码行数:12,代码来源:Retrospective.cs

示例3: FindModalWindowBasedOnSearchCriteriaWhenThereIsNoWindow

 public void FindModalWindowBasedOnSearchCriteriaWhenThereIsNoWindow()
 {
     window = application.GetWindow("Form1", InitializeOption.NoCache);
     window.Get<Button>("launchModal").Click();
     Window modalWindow = window.ModalWindow(SearchCriteria.ByText("ModalForm1"), InitializeOption.NoCache);
     Assert.AreEqual(null, modalWindow);
 }
开发者ID:huangzhichong,项目名称:White,代码行数:7,代码来源:WPFModalWindowTest.cs

示例4: Slide

 public void Slide(Window window)
 {
     var thumb = window.Get<Thumb>("Splitter");
     var originalY = thumb.Location.Y;
     thumb.SlideVertically(50);
     Assert.AreEqual(originalY + 50, thumb.Location.Y);
 }
开发者ID:ritro,项目名称:White,代码行数:7,代码来源:VerticalThumbTest.cs

示例5: Slide

 public void Slide(Window window)
 {
     var thumb = window.Get<Thumb>("Splitter");
     double originalX = thumb.Location.X;
     thumb.SlideHorizontally(50);
     Assert.AreEqual(originalX + 50, thumb.Location.X);
 }
开发者ID:ritro,项目名称:White,代码行数:7,代码来源:HorizontalThumbTest.cs

示例6: getGridData

 public void getGridData(Window win)
 {
     Thread.Sleep(1000);
      table = win.Get<Table>(SearchCriteria.ByAutomationId("grdDisplay"));
     TableRows rows = table.Rows;
     row = rows[0];
     // below line fails even though it is identified in Spy
     TableCell cell = row.Cells[0];
     String ab = cell.Value.ToString();
     Console.WriteLine(ab + " Cell Data");
     Console.ReadLine();
 }
开发者ID:ananddave123,项目名称:MyLocalRepo,代码行数:12,代码来源:Program.cs

示例7: EditBoxEnter

        public void EditBoxEnter(Window win, string Textboxname, string val)
        {
            TextBox TextObj = win.Get<TextBox>(SearchCriteria.ByAutomationId(Textboxname));
            White.Core.InputDevices.AttachedKeyboard keyboard = win.Keyboard;
            if (TextObj != null)
            {
                TextObj.Focus();
                TextObj.RaiseClickEvent();
            // below line fails
                keyboard.Enter("Harriet");
            // even below commented line fails
                //TextObj.Enter(val);
                //TextObj.BulkText = "My simple Text";
                //Keyboard.Instance.Enter("my simple");
                string aa = TextObj.Text;
                Console.WriteLine(aa + " - Value Entered in Textbox");

            }
        }
开发者ID:ananddave123,项目名称:MyLocalRepo,代码行数:19,代码来源:Program.cs

示例8: BeforeTestRun

 public static void BeforeTestRun()
 {
     app = Application.Launch("calc");
     window = app.GetWindow("Calculator");
     readout = (Label)window.Get(SearchCriteria.ByAutomationId(IDC_READOUT));
 }
开发者ID:billwestfall,项目名称:cucumber-recipes-book-code,代码行数:6,代码来源:AdditionSteps.cs

示例9: TestFixtureSetUp

 protected override void TestFixtureSetUp()
 {
     window = Application.GetWindow("FormWithPropertyGrid");
     propertyGrid = window.Get<PropertyGrid>("propertyGrid1");
 }
开发者ID:ritro,项目名称:White,代码行数:5,代码来源:PropertyGridTest.cs

示例10: FindModalWindow

 public void FindModalWindow()
 {
     window = application.GetWindow("Form1", InitializeOption.NoCache);
     window.Get<Button>("launchModal").Click();
     Assert.AreEqual(false, window.IsModal);
 }
开发者ID:huangzhichong,项目名称:White,代码行数:6,代码来源:WPFModalWindowTest.cs

示例11: GivenIStartAtTheRedLevel

 public void GivenIStartAtTheRedLevel()
 {
     _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe");
     _mainWindow = _application.GetWindow("MainWindow");
     _mainWindow.Get<Button>("goToRedLevelButton").Click();
 }
开发者ID:PapaMufflon,项目名称:CcdAddIn,代码行数:6,代码来源:CompleteLevels.cs

示例12: BaseTestFixtureSetup

 protected override void BaseTestFixtureSetup()
 {
     window = application.GetWindow("Form1", testConfiguration.WindowInitializeOption);
     if (testConfiguration is SWTTestConfiguration) resultLabel = window.Get<Label>("result");
 }
开发者ID:huangzhichong,项目名称:White,代码行数:5,代码来源:ControlsActionTest.cs

示例13: Find

 public void Find(Window window)
 {
     var thumb = window.Get<Thumb>("Splitter");
     Assert.AreNotEqual(null, thumb);
 }
开发者ID:ritro,项目名称:White,代码行数:5,代码来源:VerticalThumbTest.cs

示例14: ClassInitialize

 public static void ClassInitialize(TestContext testContext)
 {
     _app = Application.Launch(@"D:\Dev\PickAWinnerTDD\PickAWinnerTDD.UI\bin\Debug\PickAWinnerTDD.UI.exe");
     _window = _app.GetWindow("Pick A Winner");
     _window.Get<Button>(SearchCriteria.ByText("Admin")).Click();
 }
开发者ID:kburnell,项目名称:PickAWinner,代码行数:6,代码来源:MainWindow_AdminMenuOptionClicked_Tests.cs

示例15: TestFixtureSetUp

        protected override void TestFixtureSetUp()
        {
            recorderApplication = Application.Attach(Process.Start("Recorder.exe"));
            dashboard = recorderApplication.GetWindow("DashBoard", InitializeOption.NoCache);
            ListBox desktopApplications = dashboard.Get<ListBox>("applications");

            ListItem selectedApplication = desktopApplications.SelectedItem;
            if (selectedApplication.Text.Equals(application.Name))
                selectedApplication.DoubleClick();
            else
                desktopApplications.Select(application.Name);

            string text = dashboard.Get<ListBox>("windows").SelectedItemText;
            Assert.AreEqual("Form1", text);

            dashboard.Get<RadioButton>("core").Click();
            dashboard.Get<Button>("record").Click();
            editor = dashboard.Get<MultilineTextBox>("codeEditor");
        }
开发者ID:tmandersson,项目名称:FastGTD,代码行数:19,代码来源:SimpleControlRecorderTest.cs


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