當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。