public Complete_AddClientCase(Application app, Model_AddClientCase clientDetails)
        {
            application = app;

            List <Window> windows = windowTools.GetWindows(application);
            Window        window  = windowTools.GetWindow(windows, "AddClientCase");

            UIItemCollection items = windowTools.GetWindowItems(window);

            windowTools.PostToComboBoxes(items, clientDetails.mandatoryComboBoxes);
            windowTools.PostToTextBoxes(items, clientDetails.mandatoryTextBoxes);

            windowTools.PostToDatePicker(items, clientDetails.mandatoryDatePickers, window);
            windowTools.PostToTextBoxes(items, clientDetails.optionalTextBoxes);
            windowTools.PostToComboBoxes(items, clientDetails.optionalComboBoxes);
            windowTools.PostToDatePicker(items, clientDetails.optionalDatePickers, window);

            //Note: GeoCode cannot be manually entered, code below solves issue
            window.Items[26].DoubleClick();     //Find button sets GeoCode after address details are entered
            windows = application.GetWindows(); //Find EditAddressFindByMap
            windows[3].Items[1].DoubleClick();  //DoubleClick OkButton

            Button okButton = windowTools.GetButton(window, SearchCriteria.ByAutomationId("okButton"));

            windowTools.DoubleClickIUItem(okButton);
        }
예제 #2
0
        public In_Desktop_Use_SchedulingAssisstant_Set_Provider(Application app, string candidateName)
        {
            application = app;
            windowTools = new WindowTools();
            String[] weekDays = new String[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };
            //String[] weekDays = new String[] { "Saturday" };
            Button dayToClick = null;

            foreach (string day in weekDays)
            {
                List <Window> windows = windowTools.GetWindows(application);
                window     = windowTools.GetWindow(windows, "HomeHealthDesktop");
                dayToClick = GetButton(window, day);

                if (dayToClick.IsOffScreen == false)
                {
                    dayToClick.DoubleClick();
                }
                else
                {
                    windowTools.MouseDoubleClickPoint(window, new Point(dayToClick.Location.X, dayToClick.Location.Y));
                }

                SetProviderToCalendar(candidateName);
            }

            CloseSchedulingAssistantTab();
        }
예제 #3
0
        public Load_ClientCaseSearch(Application application)
        {
            WindowTools windowTools  = new WindowTools();
            Window      window       = windowTools.GetWindow(application, SearchCriteria.ByAutomationId("HomeHealthDesktop"));
            Button      clientButton = windowTools.GetButton(window, SearchCriteria.ByText("Clients"));

            windowTools.DoubleClickIUItem(clientButton);
        }
예제 #4
0
        public In_ClientCaseSearch_SelectClient(Application application, string clientName)
        {
            WindowTools   windowTools = new WindowTools();
            List <Window> windows     = windowTools.GetWindows(application);

            Window      window   = windowTools.GetWindow(windows, "ClientCaseSearch");
            ListView    listView = windowTools.GetListView(window, SearchCriteria.ByAutomationId("listView"));
            ListViewRow result   = windowTools.SelectListViewRowName(listView, clientName);

            Assert.IsNotNull(result, "Client Name Not Found In ClientCaseSearch List View.");
            windowTools.DoubleClickIUItem(result);
        }
예제 #5
0
        public Complete_EditCarePlan(Application application)
        {
            WindowTools   windowTools  = new WindowTools();
            UtilityTools  utilityTools = new UtilityTools();
            List <Window> windows      = application.GetWindows();
            Window        window       = windowTools.GetWindow(windows, "HomeHealthDesktop");
            CheckBox      activeBox;

            string[] dayCheckBoxes = new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" };

            List <IUIItem> checkBoxes = windowTools.GetIUIItemList <CheckBox>(window);

            foreach (string day in dayCheckBoxes)
            {
                activeBox         = windowTools.GetCheckBox(checkBoxes, day);
                activeBox.Checked = true;
            }

            activeBox         = windowTools.GetCheckBox(checkBoxes, "Evening");
            activeBox.Checked = true;


            //TreeView isn't really a treeView object, it's a GDI control (for some reason, I dunno)
            List <IUIItem> tabs         = windowTools.GetIUIItemList <Tab>(window);
            Tab            treeTab      = (Tab)tabs.Where(x => x.Id == "treeTabControl").FirstOrDefault();
            TabPage        ActivityTree = windowTools.GetTabPage(treeTab, "Activity Tree");

            ActivityTree.Select();

            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.TAB);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.UP);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.SPACE);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RIGHT);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.DOWN);
            window.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.SPACE);

            //ApplyButton cannot be found, (all right orientated buttons on toolStrip1 are not available) so click coordinate required
            Point ApplyButton = new Point(1544, 114);

            windowTools.MouseClickPoint(window, ApplyButton);

            //SaveButton cannot be found, (all right orientated buttons on toolStrip1 are not available) so click coordinate required
            Point SaveButton = new Point(1739, 114);

            windowTools.MouseClickPoint(window, SaveButton);

            windowTools.waitForLoadingWindowToClose(application, 1);
        }
        public In_Desktop_Use_ClientNoteBook_Load_EditCarePlan(Application application)
        {
            WindowTools    windowTools = new WindowTools();
            List <Window>  windows     = windowTools.GetWindows(application);
            Window         window      = windowTools.GetWindow(windows, "HomeHealthDesktop");
            List <IUIItem> tabs        = windowTools.GetIUIItemList <Tab>(window);
            Tab            tab         = (Tab)tabs[1]; //tabs have generic name tabControl, requires ordinal selection

            windowTools.GetAndSelectTabPage(tab, "Services / Care Plans");
            Button EditCarePlan = windowTools.GetButton(window, "Edit Care Plan");

            windowTools.DoubleClickIUItem(EditCarePlan);
        }
예제 #7
0
        public In_Desktop_Use_ClientNoteBook_Load_CalendarService(Application application)
        {
            WindowTools    windowTools = new WindowTools();
            List <Window>  windows     = windowTools.GetWindows(application);
            Window         window      = windowTools.GetWindow(windows, "HomeHealthDesktop");
            List <IUIItem> tabs        = windowTools.GetIUIItemList <Tab>(window);
            UtilityTools   ut          = new UtilityTools();

            tabs = windowTools.GetIUIItemList <Tab>(window);
            Tab tab = (Tab)tabs[1]; //tabs have generic name tabControl, requires ordinal selection

            windowTools.GetAndSelectTabPage(tab, "Calendar of Service");
            windowTools.waitForLoadingWindowToClose(application, 1);
        }
        public Login(Application application)
        {
            WindowTools    windowTools     = new WindowTools();
            Window         window          = windowTools.GetWindow(application, "Login");
            WinFormTextBox usernameTextBox = windowTools.GetIUIItem <WinFormTextBox>(window, SearchCriteria.ByAutomationId("username"));
            WinFormTextBox passwordTextBox = windowTools.GetIUIItem <WinFormTextBox>(window, SearchCriteria.ByAutomationId("password"));
            Button         okButton        = windowTools.GetButton(window, SearchCriteria.ByAutomationId("okButton"));


            windowTools.ClickIUIItem(usernameTextBox);
            windowTools.PostText(usernameTextBox, username);
            windowTools.ClickIUIItem(passwordTextBox);
            windowTools.PostText(passwordTextBox, password);
            windowTools.DoubleClickIUItem(okButton);
        }
        public SelectFacility(Application application, string facilityName)
        {
            WindowTools windowTools = new WindowTools();

            Window      window = windowTools.GetWindow(application, "Select Facility");
            RadioButton facilityRadioButton = windowTools.GetRadioButton(window, SearchCriteria.ByAutomationId("facilityRadioButton"));

            windowTools.ClickIUIItem(facilityRadioButton);
            ListBox facilityFilter = windowTools.GetListBox(window, SearchCriteria.ByAutomationId("ListBox"));

            windowTools.SelectListBoxItem(facilityFilter, "Any");
            ListView    facilityList = windowTools.GetListView(window, SearchCriteria.ByAutomationId("listView"));
            ListViewRow row          = windowTools.SelectListViewRowName(facilityList, facilityName);

            windowTools.DoubleClickIUItem(row);
        }
        //Workaround to resolve issue with AddClientCase EndDate DatePicker (Checked datepickers block text entry)
        public In_EditCarePlan_CompleteEditRevision(Application application)
        {
            WindowTools   windowTools  = new WindowTools();
            UtilityTools  utilityTools = new UtilityTools();
            List <Window> windows      = windowTools.GetWindows(application);

            Window         window  = windowTools.GetWindow(windows, "EditCarePlanRevision");
            DateTimePicker endDate = windowTools.GetDateTimePicker(window, SearchCriteria.ByAutomationId("endDate"));

            endDate.Enter("11112020");

            utilityTools.DebugWindowItems(window);

            Button okButton = windowTools.GetButton(window, "OK");

            okButton.DoubleClick();
        }
예제 #11
0
        public In_Desktop_Use_ClientNoteBook_Load_SchedulingAssistant(Application application)
        {
            WindowTools    windowTools = new WindowTools();
            List <Window>  windows     = windowTools.GetWindows(application);
            Window         window      = windowTools.GetWindow(windows, "HomeHealthDesktop");
            List <IUIItem> tabs        = windowTools.GetIUIItemList <Tab>(window);

            tabs = windowTools.GetIUIItemList <Tab>(window);
            Tab tab = (Tab)tabs[1]; //tabs have generic name tabControl, requires ordinal selection

            windowTools.GetAndSelectTabPage(tab, "Services / Care Plans");

            Button schedulingAssistant = windowTools.GetButton(window, "Fill Assignments");

            windowTools.DoubleClickIUItem(schedulingAssistant);

            windowTools.waitForLoadingWindowToClose(application, 1);
        }
        public Search_ClientCaseSearch(Application application, string searchText)
        {
            WindowTools windowTools = new WindowTools();

            List <Window>  windows = windowTools.GetWindows(application);
            Window         window  = windowTools.GetWindow(windows, "ClientCaseSearch");
            WinFormTextBox textBox = windowTools.GetIUIItem <WinFormTextBox>(window, SearchCriteria.ByAutomationId("criteria"));

            windowTools.PostText(textBox, searchText);
            Button lastNameButton = windowTools.GetButton(window, SearchCriteria.ByAutomationId("lastNameButton"));

            windowTools.DoubleClickIUItem(lastNameButton);
            windows = windowTools.GetWindows(application);
            if (windows.Count > 2)
            {
                windows[2].Items[0].DoubleClick();
                Button newClientButton = windowTools.GetButton(window, SearchCriteria.ByAutomationId("newClientButton"));
                windowTools.DoubleClickIUItem(newClientButton);
            }
        }