예제 #1
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);
        }
예제 #2
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 string getWindowDetails(Window window)
 {
     if (window.Id != "")
     {
         if (window.Id == "HomeHealthDesktop")
         {
             Tab      tab      = (Tab)windowTools.GetIUIItemList <Tab>(window)[0];
             ITabPage iTabPage = tab.Pages.Where(x => x.IsSelected).FirstOrDefault();
             if (iTabPage.Name.Replace(" ", "").Contains("EditCarePlan"))
             {
                 return($"Id_{window.Id}_EditCarePlan_items_{window.Items.Count}");
             }
             return($"Id_{window.Id}_{iTabPage.Name.Replace(" ","")}_items_{window.Items.Count}");
         }
         return($"Id_{window.Id}_items_{window.Items.Count}");
     }
     if (window.Name != "")
     {
         return($"Name_{window.Name.Replace(" ","")}_items_{window.Items.Count}");
     }
     if (window.PrimaryIdentification != "")
     {
         return($"Prime_{window.PrimaryIdentification}_items_{window.Items.Count}");
     }
     return($"LOC_{window.Location.X}_{window.Location.Y}_items_{window.Items.Count}");
 }
예제 #4
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 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 string getSelectedRadioButton(Window window)
        {
            WindowTools    wt    = new WindowTools();
            List <IUIItem> items = wt.GetIUIItemList <RadioButton>(window);
            RadioButton    button;

            foreach (IUIItem item in items)
            {
                button = (RadioButton)item;
                if (button.IsSelected)
                {
                    return(button.Id);
                }
            }
            return("");
        }
        public string getWindowTabNames(Window window)
        {
            string      temp = "";
            WindowTools wt   = new WindowTools();

            List <IUIItem> items = wt.GetIUIItemList <Tab>(window);
            Tab            tab;
            TabPage        tabPage;
            int            track          = 0;
            List <string>  activeTabPages = new List <string>();

            if (items.Count > 0)
            {
                foreach (IUIItem item in items)
                {
                    tab     = (Tab)item;
                    tabPage = (TabPage)tab.Pages.Where(page => page.IsSelected).FirstOrDefault();

                    if (window.Id.Contains("Desktop") && track == 0)
                    {
                        if (items.Count == 1)
                        {
                            activeTabPages.Add(FilterName(tabPage.Name));
                        }
                    }
                    else if (window.Id.Contains("Desktop") && track == 1)
                    {
                        if (track == 1)
                        {
                            switch (tab.Pages.Count)
                            {
                            case 7:
                                if (tab.Pages[0].Name.Contains("Client"))
                                {
                                    activeTabPages.Add("ClientNoteBook");
                                    break;
                                }
                                else if (tab.Pages[0].Name.Contains("Volume"))
                                {
                                    activeTabPages.Add("OrganizationNoteBook");
                                    break;
                                }
                                else
                                {
                                    break;
                                }

                            case 14:
                                activeTabPages.Add("ProviderNoteBook");
                                break;
                            }
                        }
                        activeTabPages.Add(FilterName(tabPage.Name));
                    }
                    else
                    {
                        activeTabPages.Add(FilterName(tabPage.Name));
                    }
                    track++;
                }

                if (activeTabPages.Count == 1)
                {
                    return($"_{activeTabPages[0]}");
                }

                foreach (string activeTabPage in activeTabPages)
                {
                    temp = $"{temp}_{activeTabPage}";
                }
            }
            return(temp);
        }