コード例 #1
0
 public void NavigateToAttendanceMenu()
 {
     ShellAction.OpenTaskMenu();
     TaskMenuActions.OpenMenuSection("section_menu_Attendance");
     Wait.WaitForDocumentReady();
     Wait.WaitLoading();
 }
コード例 #2
0
 public static void NavigateToAttendancePattern()
 {
     Wait.WaitForDocumentReady();
     ShellAction.OpenTaskMenu();
     TaskMenuActions.OpenMenuSection("section_menu_Attendance");
     SubMenuActions.ClickMenuItem("task_menu_section_attendance_AttendancePattern-");
     Wait.WaitLoading();
 }
コード例 #3
0
 public static void NavigateToApplyMarkOverDateRange()
 {
     Wait.WaitForDocumentReady();
     ShellAction.OpenTaskMenu();
     TaskMenuActions.OpenMenuSection("section_menu_Attendance");
     SubMenuActions.ClickMenuItem("task_menu_section_attendance_EnterMarkOverDateRange-");
     Wait.WaitLoading();
 }
コード例 #4
0
 public static AttendancePatternPage NavigateToAttendancePatternFromQuickSearch()
 {
     SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
     ShellAction.OpenTaskMenu();
     SeleniumHelper.Get(AttendanceElements.TaskMenuSearch).SendKeys("Attendance Pattern");
     SeleniumHelper.ClickByJS(SeleniumHelper.Get(AttendanceElements.TaskMenuSearchOption));
     Wait.WaitLoading();
     return(new AttendancePatternPage());
 }
コード例 #5
0
 public static AttendancePatternPage NavigateToAttendancePatternFromTaskMenu()
 {
     SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
     Wait.WaitForDocumentReady();
     ShellAction.OpenTaskMenu();
     TaskMenuActions.OpenMenuSection("section_menu_Attendance");
     SubMenuActions.ClickMenuItem("task_menu_section_attendance_AttendancePattern-");
     Wait.WaitLoading();
     return(new AttendancePatternPage());
 }
コード例 #6
0
        public static TemplateSearchScreen NavigateToTemplateMenuPage(bool loginFlag = true)
        {
            if (loginFlag)
            {
                SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.TestUser);  // Will be changed to SchoolAdmin when permissions gets implemented
                ShellAction.OpenTaskMenu();
                TaskMenuActions.OpenMenuSection("section_menu_Communications");
                TaskMenuActions.ClickMenuItem("task_menu_section_communications_ManageMessageTemplates");
            }
            else
            {
                ShellAction.OpenTaskMenu();
                TaskMenuActions.ClickMenuItem("task_menu_section_communications_ManageMessageTemplates");
            }

            WaitUntilDisplayed(TemplateElements.SearchPanel.SearchButton);
            return(new TemplateSearchScreen());
        }
コード例 #7
0
 public static MessageSettingScreen navigateToMessageSettingPage(SeleniumHelper.iSIMSUserType user = SeleniumHelper.iSIMSUserType.SystemManger)
 {
     SeleniumHelper.Login(user);
     POM.Helper.Wait.WaitLoading();
     ShellAction.OpenTaskMenu();
     POM.Helper.SeleniumHelper.Sleep(1);
     TaskMenuActions.OpenMenuSection("section_menu_Communications");
     POM.Helper.SeleniumHelper.Sleep(1);
     TaskMenuActions.ClickMenuItem("task_menu_section_communication_Manage_Message_Settings");
     POM.Helper.Wait.WaitLoading();
     if (new MessageSettingScreen().isPageDisplayed())
     {
         return(new MessageSettingScreen());
     }
     else
     {
         throw new NoSuchElementException("Message Setting screen not displayed.");
     }
 }
コード例 #8
0
 public static AgentSearchScreen NavigateToAgentMenuPage(bool loginFlag = true)
 {
     if (loginFlag)
     {
         SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator);
         POM.Helper.Wait.WaitLoading();
         ShellAction.OpenTaskMenu();
         TaskMenuActions.OpenMenuSection("section_menu_Communications");
         TaskMenuActions.ClickMenuItem("task_menu_section_communication_Agents");
         WaitUntilDisplayed(AgentElements.SearchPanel.SearchButton);
     }
     else
     {
         ShellAction.OpenTaskMenu();
         POM.Helper.Wait.WaitLoading();
         TaskMenuActions.ClickMenuItem("task_menu_section_communication_Agents");
         WaitUntilDisplayed(AgentElements.SearchPanel.SearchButton);
     }
     return(new AgentSearchScreen());
 }
コード例 #9
0
        //Method to login with specific user and navigate to agent add screen
        public static bool NavigateToAgentMenuPage(SeleniumHelper.iSIMSUserType userType)
        {
            //Accept the userType.
            //Switch case based on userType. To return different asserts

            SeleniumHelper.Login(userType);
            POM.Helper.Wait.WaitLoading();
            ShellAction.OpenTaskMenu();
            TaskMenuActions.OpenMenuSection("section_menu_Communications");

            switch (userType)
            {
            case SeleniumHelper.iSIMSUserType.AdmissionsOfficer:
                try
                {
                    //Can not view or add new agents.  [View -- In communications task menu entry]
                    //Returns true if agent gets listed in communication menu. Else false.
                    IWebElement AgentEntry = WebContext.WebDriver.FindElement(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    return(true);
                }
                catch (NoSuchElementException e)
                {
                    return(false);
                }

            case SeleniumHelper.iSIMSUserType.ClassTeacher:
                try
                {
                    //Can view and add new agents. Find the add new agent option in taskbar
                    //Returns true if agent option gets listed in communication menu with Add new agent option on agent screen.
                    BaseSeleniumComponents.WaitUntilDisplayed(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    IWebElement AgentEntry = WebContext.WebDriver.FindElement(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    AgentEntry.Click();

                    //Check for add new agent button
                    BaseSeleniumComponents.WaitUntilDisplayed(AgentElements.MainScreen.AddNewAgentButton);
                    WebContext.WebDriver.FindElement(AgentElements.MainScreen.AddNewAgentButton);
                    return(true);
                }
                catch (NoSuchElementException e)
                {
                    return(false);
                }

            case SeleniumHelper.iSIMSUserType.CurricularManager:
                try
                {
                    //Can not view or add new agents.  [View -- In communications task menu entry]
                    //Returns true if agent gets listed in communication menu. Else false.
                    IWebElement AgentEntry = WebContext.WebDriver.FindElement(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    return(true);
                }
                catch (NoSuchElementException e)
                {
                    return(false);
                }


            case SeleniumHelper.iSIMSUserType.SchoolAdministrator:
                try
                {
                    //Can view and add new agents. Find the add new agent option in taskbar
                    //Returns true if agent option gets listed in communication menu with Add new agent option on agent screen. Else false
                    BaseSeleniumComponents.WaitUntilDisplayed(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    IWebElement AgentEntry = WebContext.WebDriver.FindElement(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));

                    AgentEntry.Click();

                    BaseSeleniumComponents.WaitUntilDisplayed(AgentElements.MainScreen.AddNewAgentButton);
                    //Check for add new agent button
                    WebContext.WebDriver.FindElement(AgentElements.MainScreen.AddNewAgentButton);
                    return(true);
                }
                catch (NoSuchElementException e)
                {
                    return(false);
                }

            case SeleniumHelper.iSIMSUserType.SENCoordinator:
                try
                {
                    //Can view and add new agents. Find the add new agent option in taskbar
                    //Returns true if agent option gets listed in communication menu with Add new agent option on agent screen.Else false
                    BaseSeleniumComponents.WaitUntilDisplayed(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    IWebElement AgentEntry = WebContext.WebDriver.FindElement(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                    AgentEntry.Click();

                    BaseSeleniumComponents.WaitUntilDisplayed(AgentElements.MainScreen.AddNewAgentButton);
                    //Check for add new agent button
                    WebContext.WebDriver.FindElement(AgentElements.MainScreen.AddNewAgentButton);
                    return(true);
                }
                catch (NoSuchElementException e)
                {
                    return(false);
                }

            case SeleniumHelper.iSIMSUserType.SeniorManagementTeam:
                //Can view and add new agents. Find the add new agent option in taskbar
                //Returns true if agent option gets listed in communication menu with Add new agent option on agent screen.Else false
                BaseSeleniumComponents.WaitUntilDisplayed(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents")));
                WebContext.WebDriver.FindElement(By.CssSelector(SeleniumHelper.AutomationId("task_menu_section_communication_Agents"))).Click();
                try
                {
                    //Check for add new agent button
                    WebContext.WebDriver.FindElement(AgentElements.MainScreen.AddNewAgentButton);
                    return(true);
                }
                catch (NoSuchElementException e)
                {
                    return(false);
                }

            default: return(false);
            }//switch case
        }