Example #1
0
        public void TestButtonOne()
        {
            Assert.IsNotNull(app, "Should not be NULL!");
            app.SetFocus();
            WinButton btn1 = new WinButton(app);

            btn1.SearchProperties[WinButton.PropertyNames.Name] = "1";
            Mouse.Click(btn1);
            Mouse.Click(btn1);
            Mouse.Click(btn1);
            Playback.Wait(3000);
        }
        public void EjecucionEjecucionMientrasTest()
        {
            ProcessStartInfo start = new ProcessStartInfo();

            start.FileName = @"C:\Users\FEDE\AppData\Local\Temp\ejecucionMientrasTest.exe";


            using (ApplicationUnderTest app = ApplicationUnderTest.Launch(start))
            {
                app.SetFocus();

                Keyboard.SendKeysDelay = 1000; //2 segundos


                Keyboard.SendKeys("{ENTER}");
            }

            string resultado = ObtenerResultadoArchivo();

            Assert.IsTrue(!resultado.Contains("ERROR"));
        }
        public void EjecucionBasicaTest()
        {
            ProcessStartInfo start = new ProcessStartInfo();

            start.FileName = @"C:\Users\FEDE\AppData\Local\Temp\basica.exe";


            using (ApplicationUnderTest app = ApplicationUnderTest.Launch(start))
            {
                app.SetFocus();

                Keyboard.SendKeysDelay = 2000; //2 segundos

                //Keyboard.SendKeys("5");
                Keyboard.SendKeys("{ENTER}");
            }

            string resultado = ObtenerResultadoArchivo();

            Assert.IsTrue(resultado == "");
        }