예제 #1
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");
        }
예제 #2
0
        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();
        }