예제 #1
0
        public void ResetReferenceDateforAP()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Task", "Assessment", "Manage Assessment Periods");
            SeleniumHelper.WaitForElementClickableThenClick(AssessmentPeriodLink);
            Random random = new Random();
            //Create page object of marksheet Assessment Period Lookup Search Panel
            AssessmentPeriodLookupSearchPanel assessmentPeriodLookupSearchPanel = new AssessmentPeriodLookupSearchPanel();
            //Click on Search Button
            AssessmentPeriodLookupDataMaintainanceScreen assessmentperiodlookupdatamaintainancescreen = assessmentPeriodLookupSearchPanel.Search();

            string RefDateDay = "";

            RefDateDay = random.Next(1, 28).ToString();
            string RefDateMonth = "";

            RefDateMonth = random.Next(1, 12).ToString();

            //Setting Reference Date Day & Month
            assessmentperiodlookupdatamaintainancescreen = assessmentperiodlookupdatamaintainancescreen.SetCellValue(5, 1, RefDateDay);
            assessmentperiodlookupdatamaintainancescreen = assessmentperiodlookupdatamaintainancescreen.SetCellValue(6, 1, RefDateMonth);

            //Saving the Values
            assessmentperiodlookupdatamaintainancescreen = assessmentperiodlookupdatamaintainancescreen.ClickSaveButton();

            //Refreshing the screen
            assessmentperiodlookupdatamaintainancescreen = assessmentPeriodLookupSearchPanel.Search();

            //Getting the details for the newly created row
            //Assert.AreEqual(RefDateDay, assessmentperiodlookupdatamaintainancescreen.GetCellValue(5, 1));
            //Assert.AreEqual(RefDateMonth, assessmentperiodlookupdatamaintainancescreen.GetCellValue(6, 1));

            //Reseting the dates to default values
            assessmentperiodlookupdatamaintainancescreen = assessmentperiodlookupdatamaintainancescreen.ClickResetReferenceDateButton();

            List <int> defaultreferencedateday   = TestData.CreateIntegerList("Select DefaultReferenceDateDay From AssessmentPeriod Where Name Like'%" + assessmentperiodlookupdatamaintainancescreen.GetCellValue(2, 1) + "%' and TenantID ='" + MarksheetConstants.TenantId + "'", "DefaultReferenceDateDay");
            List <int> defaultreferencedatemonth = TestData.CreateIntegerList("Select DefaultReferenceDateMonth From AssessmentPeriod Where Name Like'%" + assessmentperiodlookupdatamaintainancescreen.GetCellValue(2, 1) + "%' and TenantID ='" + MarksheetConstants.TenantId + "'", "DefaultReferenceDateMonth");

            //Asserting if the values are changed to its default values
            Assert.AreEqual(assessmentperiodlookupdatamaintainancescreen.GetCellValue(5, 1), defaultreferencedateday[0].ToString());
            Assert.AreEqual(assessmentperiodlookupdatamaintainancescreen.GetCellValue(6, 1), defaultreferencedatemonth[0].ToString());
        }
예제 #2
0
        public void SearchAssessmentPeriodLookup()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Task", "Assessment", "Manage Assessment Periods");

            //Create page object of marksheet Assessment Period Lookup Search Panel
            AssessmentPeriodLookupSearchPanel assessmentPeriodLookupSearchPanel = new AssessmentPeriodLookupSearchPanel();

            SeleniumHelper.WaitForElementClickableThenClick(AssessmentPeriodLink);

            //Click on Search Button
            AssessmentPeriodLookupDataMaintainanceScreen assessmentperiodlookupdatamaintainancescreen = assessmentPeriodLookupSearchPanel.Search();

            //List<string> AssessmentPeriodNameList = new List<string>();
            //AssessmentPeriodNameList = TestData.CreateDataList("Select Name From AssessmentPeriod Where ResourceProvider IN ('" + TestData.GetSchoolID() + "','" + TestData.GetCAPITASIMSIDByTenantId() + "') and TenantId ='" + TestDefaults.Default.TenantId + "'", "Name");
            //IJavaScriptExecutor js = WebContext.WebDriver as IJavaScriptExecutor;
            ////object gridLength = (int) js.ExecuteScript("var grid = $$('cxgridAssessmentPeriods'); return grid.config.data.length;");

            //Assert.AreEqual((Int64)AssessmentPeriodNameList.Count, js.ExecuteScript("var grid = $$('cxgridAssessmentPeriods'); return grid.config.data.length;"));
            ////Assert.AreEqual(AssessmentPeriodNameList.Count, assessmentperiodlookupdatamaintainancescreen.GetAllValuesForAColumn(2).Count);

            //  assessmentperiodlookupdatamaintainancescreen = assessmentPeriodLookupSearchPanel.FilterClick();

            //enter search criteria Assessment Period name as "annual"
            assessmentPeriodLookupSearchPanel.SetAssessmentPeriodName("Annual");
            assessmentperiodlookupdatamaintainancescreen = assessmentPeriodLookupSearchPanel.Search();

            ////Get the actual number of Assessment Period present in the database
            //AssessmentPeriodNameList = TestData.CreateDataList("Select Name From AssessmentPeriod Where Name Like '%annual%' AND ResourceProvider IN ('" + TestData.GetSchoolID() + "','" + TestData.GetCAPITASIMSIDByTenantId() + "') and TenantId ='" + TestDefaults.Default.TenantId + "'", "Name");
            ////Asserting the database number with the number of AP displayed on the UI
            //Assert.AreEqual((Int64)AssessmentPeriodNameList.Count, js.ExecuteScript("var grid = $$('cxgridAssessmentPeriods'); return grid.config.data.length;"));
        }
예제 #3
0
        public void AssociateAssessmentPeriodDateRange()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Task", "Assessment", "Manage Assessment Periods");

            //Create page object of marksheet Assessment Period Lookup Search Panel
            AssessmentPeriodLookupSearchPanel assessmentPeriodLookupSearchPanel = new AssessmentPeriodLookupSearchPanel();

            SeleniumHelper.WaitForElementClickableThenClick(AssessmentPeriodDateRangeLink);
            assessmentPeriodLookupSearchPanel = assessmentPeriodLookupSearchPanel.SelectAcademicYear("Academic Year 2016/2017");
            //Click on Search Button
            AssessmentPeriodLookupDataMaintainanceScreen assessmentperiodlookupdatamaintainancescreen = assessmentPeriodLookupSearchPanel.Search();
        }