public void BaseState()
 {
     _testApp = new ApplicationUnderTest("", "TestControlTests.exe");
     _testApp.ShowDesktop();
     _testApp.Terminate();
     _testApp.Run();
 }
Beispiel #2
0
        public void BaseState()
        {
            _testApp = new ApplicationUnderTest("", "TestControlTests.exe");
            _testApp.Terminate();
            _testApp.ShowDesktop();
            _testApp.Run();

            var repo = new ControlLocatorDefRepo("app");

            repo.FindByCaption("Demo Form");

            repo = new ControlLocatorDefRepo("ok button");
            repo.FindUsing("app");
            repo.FindByAutomationId("buttonOk");

            repo = new ControlLocatorDefRepo("text box1");
            repo.FindUsing("app");
            repo.FindByAutomationId("textBox1");

            repo = new ControlLocatorDefRepo("text box2");
            repo.FindUsing("app");
            repo.FindByAutomationId("textBox2");

            repo = new ControlLocatorDefRepo("ok button using root automation id");
            repo.FindByAutomationId("Form1", true);
            repo.FindByAutomationId("buttonOk");

            repo = new ControlLocatorDefRepo("ok button using button name");
            repo.FindUsing("app");
            repo.FindByName("Ok");
        }
        public void setup()
        {
            var repo = new ControlLocatorDefRepo("calcapp");

            repo.Wait(500);
            repo.FindByName("Calculator", true);

            repo = new ControlLocatorDefRepo("result");
            repo.FindUsing("calcapp");
            repo.FindByAutomationId("150");

            repo = new ControlLocatorDefRepo("4");
            repo.FindUsing("calcapp");
            repo.FindByName("4");

            _testApp.Terminate();
            _testApp.Run();
        }
Beispiel #4
0
        public void TestLaunchWinFormDemoApp()
        {
            var demoApp = new ApplicationUnderTest("", "TestControlTests.exe");

            demoApp.ShowDesktop();
            demoApp.RunOnce();
            if (demoApp.WaitForCaptionIfExists("***Demo Form-aaaaa", 2))
            {
                Assert.Fail("this should not pass");
            }

            if (demoApp.WaitForCaptionIfExists("Demo Form", 2))
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.Fail("unable to get demoapp window caption");
            }

            demoApp.Terminate();
        }