示例#1
0
        public void CheckControlTestMainWindow()
        {
            Window  mainWindow = application.GetWindow("MainWindow");
            ListBox lCheck     = mainWindow.Get <ListBox>("CheckedListBox");

            lCheck.Select(0);
            Thread.Sleep(2000);
            lCheck.Check("Item4");
            Thread.Sleep(2000);
            lCheck.UnCheck("Item4");
            Thread.Sleep(2000);
            application.Close();
        }
示例#2
0
        public void SecondWindowTestRadio()
        {
            Window mainWindow = application.GetWindow("MainWindow");

            //TestStack.White.UIItems.TabItems.TabPage tabInput = mainWindow.Get<White.UIItems.TabItems.TabPage>(SearchCriteria.ByText("Input Controls"));
            //tabInput.Click();
            TestStack.White.UIItems.RadioButton rdoBtn1 = mainWindow.Get <White.UIItems.RadioButton>(SearchCriteria.ByAutomationId("RadioButton1"));
            rdoBtn1.Click();
            Thread.Sleep(2000);
            TestStack.White.UIItems.RadioButton rdoBtn2 = mainWindow.Get <White.UIItems.RadioButton>(SearchCriteria.ByAutomationId("RadioButton2"));
            rdoBtn2.Click();
            Thread.Sleep(2000);
            application.Close();
        }
示例#3
0
        public void thirdwindowNode()
        {
            Window mainWindow = application.GetWindow("MainWindow");

            TestStack.White.UIItems.TreeItems.TreeNode nodeOne = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Root"));
            nodeOne.Select();
            nodeOne.Expand();
            Thread.Sleep(2000);
            TestStack.White.UIItems.TreeItems.TreeNode nodeTwo = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Child"));
            nodeTwo.Select();
            nodeTwo.Expand();
            Thread.Sleep(2000);
            TestStack.White.UIItems.TreeItems.TreeNode nodeThree = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Grand Child"));
            nodeThree.Select();
            Thread.Sleep(2000);
            TestStack.White.UIItems.TreeItems.TreeNode nodeFour = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Lots Of Children"));
            nodeFour.Select();
            nodeFour.Expand();
            Thread.Sleep(1000);
            TestStack.White.UIItems.TreeItems.TreeNode nodeFour_child1 = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Child1"));
            nodeFour_child1.Select();
            Thread.Sleep(1000);
            TestStack.White.UIItems.TreeItems.TreeNode nodeFour_child2 = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Child2"));
            nodeFour_child2.Select();
            Thread.Sleep(1000);
            TestStack.White.UIItems.TreeItems.TreeNode nodeFour_child3 = mainWindow.Get <White.UIItems.TreeItems.TreeNode>(SearchCriteria.ByText("Child3"));
            nodeFour_child3.Select();
            Thread.Sleep(1000);
            nodeFour.Collapse();
            Thread.Sleep(2000);
            TestStack.White.UIItems.Button btnAddNode = mainWindow.Get <White.UIItems.Button>(SearchCriteria.ByText("Add Node"));
            btnAddNode.Click();
            btnAddNode.Click();
            Thread.Sleep(2000);
            application.Close();
        }