示例#1
0
        public void Scenario1()
        {
            //Action
            UserInputs.PressKey((int)VirtualKeys.F2);
            Thread.Sleep(10000);
            ViPrClass.SetDocNumberAndSN(NunitSettings.DocumentNumber, NunitSettings.SN);

            //Hot keys
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(2000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(2000);
            UserInputs.PressKey((int)VirtualKeys.O);
            Thread.Sleep(2000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(4000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            //Set PendReason to Maternity
            UserInputs.PressKey((int)VirtualKeys.M);
            Thread.Sleep(2000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(3000);

            Console.WriteLine("Before Exit ViPr");
            ViPrClass.ExitVipr();

            //Stop services
            Service.Stop(NunitSettings.ServiceWdName);
            Service.Stop(NunitSettings.ServiceDttName);

            // Create List of Expected hotkeys
            List <OpenSpan> ExpHotkeys = new List <OpenSpan>();

            ExpHotkeys.Add(OpenSpanEvents.F2_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.AltA_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.AltA_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.AltA_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.CtrlM_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.CtrlM_hotkey);

            //Check if Expected hotkeys correspond to Actual
            CheckResults.CheckAllHotkeys(ExpHotkeys);

            List <string> ExpApplications = new List <string>();

            ExpApplications.Add("\"C:\\Program Files\\ViPr\\ViPr.exe\"");
            //ExpApplications.Add("Inquiry:Inquiry - Session 3");

            Assert.IsTrue(CheckResults.CheckAllFocusIn(ExpApplications));

            //Create Expected data for Close event.
            List <OpenSpanClose> ExpectedCloseEventList = new List <OpenSpanClose>();
            OpenSpanClose        ExpectedCloseEvent     = new OpenSpanClose();

            ExpectedCloseEvent.trigger               = "z030_Proclaim_WU_Close.WorkUnitClose";
            ExpectedCloseEvent.application_id        = "Proclaim";
            ExpectedCloseEvent.document_id           = "0431202304001";
            ExpectedCloseEvent.work_unit_status_code = "O";

            ExpectedCloseEventList.Add(ExpectedCloseEvent);

            // Check if expected CloseEvent correspond to Actual.
            CheckResults.CheckWorkUnitClose(ExpectedCloseEventList);

            //Here we check if number of Close an Open events are the same
            Assert.AreEqual(PacketParser.GetAllCloseEvents(Path.Combine(NunitSettings.BackupFolder, String.Concat(TestHelper.getTestName(), ".xml"))).Count, PacketParser.GetAllOpenEvents(Path.Combine(NunitSettings.BackupFolder, String.Concat(TestHelper.getTestName(), ".xml"))).Count);
        }
示例#2
0
        public void CHIRPS()
        {
            Console.WriteLine("CHIRPS");

            UserInputs.PressKey((int)VirtualKeys.F2);
            Thread.Sleep(5000);
            ViPrClass.SetDocNumberAndSN(NunitSettings.DocumentNumber, NunitSettings.SN);

            //Hot keys
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(5000);

            ViPrClass.SwitchToSession2();
            Thread.Sleep(3000);

            Window SESSION2 = ManageWindows.GetWindow("SESSION2");

            MenuBar menuBar = SESSION2.MenuBar;

            White.Core.UIItems.MenuItems.Menu OpenSessionMenu = menuBar.MenuItem("File", "Open Session...");
            OpenSessionMenu.Click();
            Thread.Sleep(2000);

            SESSION2 = ManageWindows.GetWindow("SESSION2");

            var OpenSessionWindow = SESSION2.ModalWindows()[0];

            Thread.Sleep(2000);

            White.Core.UIItems.TextBox FileNameTextBox = OpenSessionWindow.Get <White.Core.UIItems.TextBox>(SearchCriteria.ByAutomationId("1152"));
            FileNameTextBox.Click();
            UserInputs.Enter("Session1.edp");
            Thread.Sleep(2000);
            OpenSessionWindow.Get <White.Core.UIItems.Button>(SearchCriteria.ByText("Open")).Click();
            ViPrClass.SwitchToSession1();

            Thread.Sleep(5000);
            UserInputs.Enter("EBDAA08");
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.RETURN);
            Thread.Sleep(3000);
            //Enter opertorId
            UserInputs.Enter(NunitSettings.OperatorId);
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.TAB);
            UserInputs.Enter(NunitSettings.PasswordId);
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.RETURN);
            Thread.Sleep(3000);
            UserInputs.Enter("GHMM");
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.RETURN);
            Thread.Sleep(5000);

            ViPrClass.SwitchToViPr();

            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(8000);

            UserInputs.PressKey((int)VirtualKeys.O);
            Thread.Sleep(2000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(2000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(5000);

            //Enter Pend Reason "AAMC"
            UserInputs.PressKey((int)VirtualKeys.A);
            Thread.Sleep(2000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(5000);

            ViPrClass.ExitVipr();

            //Stop services
            Service.Stop(NunitSettings.ServiceWdName);
            Service.Stop(NunitSettings.ServiceDttName);

            // Check all FocusIns
            List <string> ExpApplications = new List <string>();

            ExpApplications.Add("AppUse:CHIRPS - Session 1");

            Assert.IsTrue(CheckResults.CheckAllFocusIn(ExpApplications));
        }
示例#3
0
        public void GROUP()
        {
            Console.WriteLine("GROUP");

            UserInputs.PressKey((int)VirtualKeys.F2);
            Thread.Sleep(5000);
            ViPrClass.SetDocNumberAndSN(NunitSettings.DocumentNumber, NunitSettings.SN);

            //Hot keys
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(5000);

            ViPrClass.SwitchToSession2();
            Thread.Sleep(3000);

            Window SESSION2 = ManageWindows.GetWindow("SESSION2");

            MenuBar menuBar = SESSION2.MenuBar;

            White.Core.UIItems.MenuItems.Menu OpenSessionMenu = menuBar.MenuItem("File", "Open Session...");
            OpenSessionMenu.Click();
            Thread.Sleep(2000);

            SESSION2 = ManageWindows.GetWindow("SESSION2");

            var OpenSessionWindow = SESSION2.ModalWindows()[0];

            Thread.Sleep(2000);

            White.Core.UIItems.TextBox FileNameTextBox = OpenSessionWindow.Get <White.Core.UIItems.TextBox>(SearchCriteria.ByAutomationId("1152"));
            FileNameTextBox.Click();
            UserInputs.Enter("Session4.edp");
            Thread.Sleep(2000);
            OpenSessionWindow.Get <White.Core.UIItems.Button>(SearchCriteria.ByText("Open")).Click();
            ViPrClass.SwitchToSession4();

            Thread.Sleep(5000);
            UserInputs.Enter("HSIMSA");
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.RETURN);
            Thread.Sleep(3000);

            //Enter opertorId
            UserInputs.Enter(NunitSettings.OperatorId);
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.TAB);
            UserInputs.Enter(NunitSettings.PasswordId);
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.RETURN);
            Thread.Sleep(3000);
            UserInputs.Enter("GROUP");
            UserInputs.PressKey((int)KeyboardInput.SpecialKeys.RETURN);
            Thread.Sleep(5000);

            ViPrClass.SwitchToViPr();

            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(8000);

            UserInputs.PressKey((int)VirtualKeys.O);
            Thread.Sleep(2000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(2000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(5000);

            //Enter Pend Reason "AAMC"
            UserInputs.PressKey((int)VirtualKeys.A);
            Thread.Sleep(2000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(5000);

            ViPrClass.ExitVipr();

            //Stop services
            Service.Stop(NunitSettings.ServiceWdName);
            Service.Stop(NunitSettings.ServiceDttName);

            // Check all FocusIns
            List <string> ExpApplications = new List <string>();

            ExpApplications.Add("https://cigna.esecurecare.net/app/home");
            ExpApplications.Add("https://cigna.esecurecare.net/app/answers/list/search/1/kw/RNC/answers.c$is_healthcare_reform/~any~");
            ExpApplications.Add("C-KIT:Reimbursement RNC 501 Processing Reference Guide");
            ExpApplications.Add("\"C:\\Program Files\\E!PC\\EXTRA.exe\" C:\\Program Files\\E!PC\\Sessions\\Session4.edp");
            ExpApplications.Add("AppUse:Group - Session 4");

            Assert.IsTrue(CheckResults.CheckAllFocusIn(ExpApplications));
        }
示例#4
0
        public void Scenario3()
        {
            UserInputs.PressKey((int)VirtualKeys.F2);
            Thread.Sleep(5000);

            ViPrClass.SetDocNumberAndSN(NunitSettings.DocumentNumber, NunitSettings.SN);

            //Hot keys
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(5000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(5000);

            Console.WriteLine("SwitchToSession3");
            ViPrClass.SwitchToSession3();


            UserInputs.PressKey((int)VirtualKeys.F4);
            Thread.Sleep(1000);
            UserInputs.PressKey((int)VirtualKeys.Tab);
            Thread.Sleep(2000);


            Console.WriteLine("SetDocNumberAndSN");
            UserInputs.PressKey(6);
            Thread.Sleep(100);
            ViPrClass.EnterNumberInSession(NunitSettings.DocumentNumber);

            //ViPrClass.SetDocNumberAndSN("0431202304001", "9");

            UserInputs.PressEnter();
            Thread.Sleep(5000);
            UserInputs.PressEnter();
            Thread.Sleep(5000);
            UserInputs.PressKey((int)VirtualKeys.M);
            Thread.Sleep(100);
            UserInputs.PressKey((int)VirtualKeys.H);
            Thread.Sleep(100);
            UserInputs.PressKey((int)VirtualKeys.I);
            Thread.Sleep(100);

            UserInputs.PressEnter();
            Thread.Sleep(5000);

            Console.WriteLine("Return from SESSION3 to ViPr");
            ViPrClass.SwitchToViPr();

            UserInputs.PressKey((int)VirtualKeys.O);
            Thread.Sleep(5000);

            UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "A");
            Thread.Sleep(5000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(5000);
            //SetPendReason "ALLI-ALLIANCE"
            UserInputs.PressKey((int)VirtualKeys.A);
            Thread.Sleep(2000);
            UserInputs.PressKey((int)VirtualKeys.A);
            Thread.Sleep(2000);
            UserInputs.PressKey((int)VirtualKeys.A);
            Thread.Sleep(2000);
            UserInputs.HotKey(KeyboardInput.SpecialKeys.CONTROL, "M");
            Thread.Sleep(5000);

            //Stop services
            Service.Stop(NunitSettings.ServiceWdName);
            Service.Stop(NunitSettings.ServiceDttName);
            Thread.Sleep(20000);

            ViPrClass.ExitVipr();

            // Create List of Expected hotkeys
            List <OpenSpan> ExpHotkeys = new List <OpenSpan>();

            ExpHotkeys.Add(OpenSpanEvents.F2_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.AltA_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.AltA_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.F4_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.AltA_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.CtrlM_hotkey);
            ExpHotkeys.Add(OpenSpanEvents.CtrlM_hotkey);

            //Check if Expected hotkeys correspond to Actual
            CheckResults.CheckAllHotkeys(ExpHotkeys);

            // Check all FocusIns
            List <string> ExpApplications = new List <string>();

            ExpApplications.Add("\"C:\\Program Files\\ViPr\\ViPr.exe\"");
            ExpApplications.Add("\"C:\\Program Files\\E!PC\\EXTRA.exe\" -Embedding");
            ExpApplications.Add("Inquiry:Screen 3 - Medical History");
            ExpApplications.Add("\"C:\\Program Files\\ViPr\\ViPr.exe\"");

            Assert.IsTrue(CheckResults.CheckAllFocusIn(ExpApplications));

            // Check screen destroying.
            List <OpenSpanClose> ExpScreen7Destroy  = new List <OpenSpanClose>();
            OpenSpanClose        ExpectedCloseEvent = new OpenSpanClose();

            ExpectedCloseEvent.document_id           = NunitSettings.DocumentNumber;
            ExpectedCloseEvent.pend_reason_code      = "AAMC"; //this shoud be confirmed.
            ExpectedCloseEvent.work_unit_status_code = "O";

            ExpScreen7Destroy.Add(ExpectedCloseEvent);
            //Program.CheckScreen_7_DestroyEvent(ExpScreen7Destroy);

            //Here we check if number of Close an Open events are the same
            Assert.AreEqual(PacketParser.GetAllCloseEvents(Path.Combine(NunitSettings.BackupFolder, String.Concat(TestHelper.getTestName(), ".xml"))).Count, PacketParser.GetAllOpenEvents(Path.Combine(NunitSettings.BackupFolder, String.Concat(TestHelper.getTestName(), ".xml"))).Count);
        }