Exemple #1
0
        public void SetFocusToExternalAppCHromeTest()
        {
            var strProcessName = "chrome";

            Assert.IsTrue(ApplicationInput.SetFocusToExternalApp(strProcessName), $"Could not set Focus to {strProcessName} as it was not running.");
            var activeProcessName = ApplicationInput.GetActiveProcessName();

            Console.WriteLine(activeProcessName);
            Assert.IsTrue(activeProcessName.Contains(strProcessName));
        }
Exemple #2
0
        public void SetFocusToExternalAppFireFoxTest()
        {
            var strProcessName = "firefox";

            Assert.IsTrue(ApplicationInput.SetFocusToExternalApp(strProcessName), $"Could not set Focus to {strProcessName}");
            var activeProcessName = ApplicationInput.GetActiveProcessName();

            Console.WriteLine(activeProcessName);
            Assert.IsTrue(activeProcessName.Contains(strProcessName));
            //   Assert.IsTrue(ApplicationInput.StopFlashingWindow("firefox"),"");
            // ApplicationInput.SetFocusToExternalApp("PaintDotNet");
            //  ApplicationInput.SetFocusToExternalApp("Chrome");
        }