Beispiel #1
0
        private Button GetButton(Window window, string buttonName)
        {
            Button button = null;

            do
            {
                button = windowTools.GetButton(window, buttonName);
            } while (button == null || !button.Enabled);
            return(button);
        }
        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);
        }
Beispiel #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);
        }
        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);
            }
        }
        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);
        }
        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);
        }
        //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();
        }
Beispiel #8
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);
        }