public void ViewSelectDescription()
        {
            //Login
            FeatureBee.FeatureBeeLogin.LoginWithFeatureBee(new[] { "NewMarksheet" }, FeatureBee.FeatureBeeLogin.iSIMSUserType.TestUser);

            //Going to desired path

            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Manage Templates");
            WaitUntillAjaxRequestCompleted();
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            CreateMarksheet createMarksheet = (CreateMarksheet)marksheetTypeMenuPage.MarksheetTypeSelection("New Template(Blank)");

            WaitUntillAjaxRequestCompleted();
            CurriculumMarksheetMaintainance curriculummarksheetmaintainance = new CurriculumMarksheetMaintainance();
            string TemplateName        = curriculummarksheetmaintainance.GenerateRandomString(10);
            string TemplateDescription = curriculummarksheetmaintainance.GenerateRandomString(20);

            createMarksheet.FillTemplateDetails(TemplateName, TemplateDescription);
            Thread.Sleep(500);
            curriculummarksheetmaintainance = curriculummarksheetmaintainance.SelectCurriculum();

            int[] checkedboxIndex = { 5, 6, 7 };
            foreach (var index in checkedboxIndex)
            {
                curriculummarksheetmaintainance = curriculummarksheetmaintainance.CheckStatement(index);
            }

            int SelectedTextCount = curriculummarksheetmaintainance.GetSelectedCount();
            int GetCheckedCount   = curriculummarksheetmaintainance.GetCheckedCount();

            Assert.AreEqual(SelectedTextCount, GetCheckedCount);
        }
        public void SaveTemplate()
        {
            //Login
            FeatureBee.FeatureBeeLogin.LoginWithFeatureBee(new[] { "NewMarksheet" }, FeatureBee.FeatureBeeLogin.iSIMSUserType.TestUser);

            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Manage Templates");
            WaitUntillAjaxRequestCompleted();
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            CreateMarksheet createMarksheet = (CreateMarksheet)marksheetTypeMenuPage.MarksheetTypeSelection("New Template(Blank)");

            WaitUntillAjaxRequestCompleted();
            CurriculumMarksheetMaintainance curriculummarksheetmaintainance = new CurriculumMarksheetMaintainance();
            string TemplateName        = curriculummarksheetmaintainance.GenerateRandomString(10);
            string TemplateDescription = curriculummarksheetmaintainance.GenerateRandomString(20);

            createMarksheet.FillTemplateDetails(TemplateName, TemplateDescription);

            curriculummarksheetmaintainance = curriculummarksheetmaintainance.SelectCurriculum();
            curriculummarksheetmaintainance.SelectStatement();
            // Add Selected Columns
            curriculummarksheetmaintainance = curriculummarksheetmaintainance.AddSelectedColumns();
            Thread.Sleep(500);

            curriculummarksheetmaintainance = curriculummarksheetmaintainance.Save();
            Thread.Sleep(2000);
        }
Exemple #3
0
        public void CreateMarksheetForSchoolGroup(string className, string year)
        {
            SeleniumHelper.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            MarksheetBuilder marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Template");

            //Randomly generate Unique Marksheet Name
            var MarksheetTemplateName = marksheetBuilder.RandomString(8);

            //Verifying the saved marksheet
            marksheetBuilder.setMarksheetProperties(MarksheetTemplateName, "Description", true);
            AddAssessments addAssessments = marksheetBuilder.NavigateAssessments();
            AddAspects     addAspects     = addAssessments.NavigateAssessmentsviaAssessment();

            addAspects.SelectNReturnSelectedAssessments(2);
            AddAssessmentPeriod addAssessmentPeriod = addAspects.AspectNextButton();

            addAssessmentPeriod.AspectAssessmentPeriodSelection(2);
            addAssessmentPeriod.ClickAspectAssessmentPeriodDone();
            WaitUntilDisplayed(BrowserDefaults.TimeOut, By.LinkText("School Groups"));
            WaitForAndClick(BrowserDefaults.TimeOut, By.LinkText("School Groups"));
            ReadOnlyCollection <IWebElement> YearGroupCheckboxlistYG = WebContext.WebDriver.FindElements(By.CssSelector("input[name='YearGroups.SelectedIds']"));

            foreach (IWebElement eachelement in YearGroupCheckboxlistYG)
            {
                if (
                    WebContext.WebDriver.FindElement(
                        By.CssSelector("label[for='" + eachelement.GetAttribute("id") + "']")).Text == year)
                {
                    eachelement.Click();
                    break;
                }
            }

            if (!string.IsNullOrEmpty(className))
            {
                ReadOnlyCollection <IWebElement> classesList = WebContext.WebDriver.FindElements(By.CssSelector("input[name='Classes.SelectedIds']"));
                foreach (IWebElement classElement in classesList)
                {
                    if (
                        WebContext.WebDriver.FindElement(
                            By.CssSelector("label[for='" + classElement.GetAttribute("id") + "']")).Text == className)
                    {
                        classElement.Click();
                        break;
                    }
                }
            }

            WaitForAndClick(BrowserDefaults.TimeOut, By.CssSelector("button[data-automation-id='next-group']"));
            WebContext.WebDriver.FindElement(By.CssSelector("[data-automation-id='save_button']")).Click();
        }
Exemple #4
0
        public void AssignGradesetPopoverMessagethroughSave()
        {
            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, false);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            MarksheetBuilder marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Template");

            AddAssessments addassessment = marksheetBuilder.NavigateAssessments();

            //Adding Subject to the Marksheet Template
            AddSubjects addSubjects = addassessment.NavigateAssessmentsviaSubject();

            //Selecting a Subject
            addSubjects.EnterSubjectSearchCriteria("Language and Literacy");
            addSubjects = addSubjects.ClickSubjectSearchButton();
            addSubjects.SelectSubjectResult(1);
            AddModeMethodPurpose addmodemethodpurpose = addSubjects.SubjectNextButton();

            //Selecting a Mode Method and Purpose for that Subject
            addmodemethodpurpose.purposeAssessmentPeriodSelection(1);
            addmodemethodpurpose.modeAssessmentPeriodSelection(1);
            addmodemethodpurpose.methodAssessmentPeriodSelection(1);

            //Selecting an Assessment Period
            AddAssessmentPeriod addassessmentperiod = addmodemethodpurpose.modeMethodPurposeNextButton();

            addassessmentperiod.subjectAssessmentPeriodSelection(1);
            marksheetBuilder = addassessmentperiod.ClickSubjectAssessmentPeriodDone();

            //Check Assign gradeset popover is displayed and the close it
            MarksheetTemplateProperties marksheetTemplateProperties = new MarksheetTemplateProperties();

            marksheetTemplateProperties.CheckAssignGradepopover();
            marksheetTemplateProperties.CloseAssignGradepopover();

            //Adding Marksheet Template Name
            marksheetTemplateProperties.OpenDetailsTab();
            MarksheetTemplateDetails marksheettemplatedetails = new MarksheetTemplateDetails();
            string TemplateName = marksheetBuilder.RandomString(10);

            marksheettemplatedetails.SetMarksheetTemplateName(TemplateName);
            SaveMarksheetTemplate savemarksheettemplate = new SaveMarksheetTemplate();

            savemarksheettemplate.ClickSaveButton();
            //Check Assign gradeset popover message is displayed on click on Save
            marksheetTemplateProperties.CheckAssignGradepopover();
        }
        public CreateMarksheetForDataEntry(SeleniumHelper.iSIMSUserType userType = SeleniumHelper.iSIMSUserType.AssessmentCoordinator)
        {
            SeleniumHelper.Login(userType, false);
            SeleniumHelper.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();

            marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Template");

            //Randomly generate Unique Marksheet Name
            MarksheetTemplateName = marksheetBuilder.RandomString(8);
            //Verifying the saved marksheet
            marksheetBuilder.setMarksheetProperties(MarksheetTemplateName, "Description", true);
            marksheetBuilder.SelectPropertiesTab();
        }
Exemple #6
0
        public void GradesetBulkAllocate()
        {
            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            MarksheetBuilder marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Template");
            //Adding Marksheet Template Name
            MarksheetTemplateDetails marksheettemplatedetails = new MarksheetTemplateDetails();
            string TemplateName = marksheetBuilder.RandomString(10);

            marksheettemplatedetails.SetMarksheetTemplateName(TemplateName);

            //Adding Subject to the Marksheet Template
            AddAssessments addassessment = marksheetBuilder.NavigateAssessments();
            AddSubjects    addSubjects   = addassessment.NavigateAssessmentsviaSubject();

            //Selecting a Subject
            int noofselectedsubject = 2;

            addSubjects.SelectSubjectResult(noofselectedsubject);
            AddModeMethodPurpose addmodemethodpurpose = addSubjects.SubjectNextButton();

            //Scenario 1 : One Column Definition

            int modeSelected = 1, methodSected = 1, purposeSelected = 1;

            //Selecting a Mode Method and Purpose for that Subject
            addmodemethodpurpose.purposeAssessmentPeriodSelection(purposeSelected);
            addmodemethodpurpose.modeAssessmentPeriodSelection(modeSelected);
            addmodemethodpurpose.methodAssessmentPeriodSelection(methodSected);

            AddAssessmentPeriod addassessmentperiod = addmodemethodpurpose.modeMethodPurposeNextButton();

            addassessmentperiod.subjectAssessmentPeriodSelection(1);
            marksheetBuilder = addassessmentperiod.ClickSubjectAssessmentPeriodDone();

            //Assigning a Gradeset to a Subject
            MarksheetTemplateProperties marksheettemplateproperties = new MarksheetTemplateProperties();

            marksheettemplateproperties.SelectGridRows();

            BulkAssignGradeset  bulkassigngradeset  = marksheettemplateproperties.OpenBulkGradesetAllocationMenu();
            GradesetSearchPanel gradesetsearchpanel = bulkassigngradeset.ClickAddGradeSetButton();

            gradesetsearchpanel = gradesetsearchpanel.Search(true);
            string selectedgradesetname             = gradesetsearchpanel.GetFirstGradesetName();

            GradesetDataMaintenance gradesetdatamaintenance = gradesetsearchpanel.SelectGradeset();

            marksheettemplateproperties = gradesetdatamaintenance.ClickOkButton();

            bulkassigngradeset.ApplyGradeset();
            List <string> AssessmentGradesetNameList = marksheettemplateproperties.GetAllGradesetNames();

            foreach (string eachvalue in AssessmentGradesetNameList)
            {
                Assert.AreEqual(selectedgradesetname, eachvalue);
            }
            //Apply the gradeset of type Comment
            marksheettemplateproperties.SelectGridRows();
            bulkassigngradeset          = marksheettemplateproperties.OpenBulkGradesetAllocationMenu();
            marksheettemplateproperties = bulkassigngradeset.SelectComment();
            //Apply the overwrite functionality
            marksheettemplateproperties = marksheettemplateproperties.SelectMultipleRows(4);
            marksheettemplateproperties = marksheettemplateproperties.SelectMultipleRows(2);
            bulkassigngradeset          = marksheettemplateproperties.OpenBulkGradesetAllocationMenu();
            gradesetsearchpanel         = bulkassigngradeset.ClickAddGradeSetButton();
            gradesetsearchpanel         = gradesetsearchpanel.Search(true);

            gradesetdatamaintenance = gradesetsearchpanel.SelectGradeset(2);
            gradesetdatamaintenance.ClickOkButton();
            bulkassigngradeset.SelectOverwrite();
            bulkassigngradeset.ApplyGradeset();
        }
Exemple #7
0
        public GroupFilterDetail CreateMarksheet(string groupFilter)
        {
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.SchoolAdministrator, false);
            SeleniumHelper.NavigateMenu("Tasks", "Assessment", "Set Up Marksheets and Parental Reports");
            //Create page object of marksheet home
            CreateMarksheetTypeSelectionPage marksheetTypeMenuPage = new CreateMarksheetTypeSelectionPage();
            MarksheetBuilder marksheetBuilder = (MarksheetBuilder)marksheetTypeMenuPage.MarksheetTypeSelection("New Marksheet");

            //Randomly generate Unique Marksheet Name
            var MarksheetTemplateName = marksheetBuilder.RandomString(8);

            //Verifying the saved marksheet
            marksheetBuilder.setMarksheetProperties(MarksheetTemplateName, "Description", true);
            marksheetBuilder.SelectPropertiesTab();

            AddAssessments addAssessments = marksheetBuilder.NavigateAssessments();
            AddAspects     addAspects     = addAssessments.NavigateAssessmentsviaAssessment();

            addAspects.SelectNReturnSelectedAssessments(2);
            AddAssessmentPeriod addAssessmentPeriod = addAspects.AspectNextButton();

            addAssessmentPeriod.AspectAssessmentPeriodSelection(1);
            addAssessmentPeriod.ClickAspectAssessmentPeriodDone();

            marksheetBuilder.NavigateAssessments();
            AddSubjects addSubjects = addAssessments.NavigateAssessmentsviaSubject();

            addSubjects.SelectSubjectResultfromName("Language and Literacy");
            AddModeMethodPurpose addModeMethodPurpose = addSubjects.SubjectNextButton();

            addModeMethodPurpose.purposeAssessmentPeriodSelection(1);
            addModeMethodPurpose.modeAssessmentPeriodSelection(2);
            addModeMethodPurpose.methodAssessmentPeriodSelection(1);


            addAssessmentPeriod = addModeMethodPurpose.modeMethodPurposeNextButton();
            //addAssessmentPeriod.subjectAssessmentPeriodSelection(2);
            marksheetBuilder = addAssessmentPeriod.ClickSubjectAssessmentPeriodDone();


            AddGroups addgroups = marksheetBuilder.NavigateGroups();

            addgroups.SelectYearGroup("Year 1");
            List <string> selectedGroups = addgroups.GetSelectedGroupOrGroupfilter(MarksheetConstants.SelectYearGroups);

            addgroups.ClickDoneButton();
            GroupFilters groupfilter = new GroupFilters();

            groupfilter.SelectClassFilterName("");
            WebContext.WebDriver.FindElements(By.CssSelector("[name='ClassesFilter.SelectedIds']"))
            .FirstOrDefault()
            .Click();
            marksheetBuilder = groupfilter.ClickDoneButton();

            ReadOnlyCollection <IWebElement> hiddenElementsCollection = WebContext.WebDriver.FindElements(By.CssSelector("[data-createmarksheet-hidden='']"));
            int count = hiddenElementsCollection.Count;

            hiddenElementsCollection[count - 1].Click();
            hiddenElementsCollection[count - 2].Click();

            IWebElement propertiesGrid = MarksheetGridHelper.GetGridDetails(MarksheetGridHelper.PropertiesGridId);

            propertiesGrid = MarksheetGridHelper.GetGridDetails(MarksheetGridHelper.PropertiesGridId);
            IWebElement gradesetColumn = propertiesGrid.FindElement(MarksheetConstants.GradesetColumn);
            ReadOnlyCollection <IWebElement> gradesetColumnCell = gradesetColumn.FindElements(MarksheetConstants.ColumnCell);
            IWebElement gradeDetailsLink;
            int         posMode   = -1;
            int         endOfYear = 0;

            gradesetColumn     = propertiesGrid.FindElement(MarksheetConstants.GradesetColumn);
            gradesetColumnCell = gradesetColumn.FindElements(MarksheetConstants.ColumnCell);

            posMode = 0;

            int newi = 6;

            Assert.AreEqual(gradesetColumnCell[newi].Text, "Assign");
            gradeDetailsLink = gradesetColumnCell[newi].FindElement(By.TagName("button"));
            gradeDetailsLink.Click();
            MarksheetGridHelper.GradesetDetailsSelector("Age -99/11-99/11");
            // waiter.Until(ExpectedConditions.ElementToBeClickable(gradeDetailsLink));
            posMode++;

            //To avoid stale references.
            propertiesGrid     = MarksheetGridHelper.GetGridDetails(MarksheetGridHelper.PropertiesGridId);
            gradesetColumn     = propertiesGrid.FindElement(MarksheetConstants.GradesetColumn);
            gradesetColumnCell = gradesetColumn.FindElements(MarksheetConstants.ColumnCell);
            // Assert.AreEqual("MIST Grades", gradesetColumnCell[newi].Text);

            gradeDetailsLink = gradesetColumnCell[newi + 1].FindElement(By.TagName("button"));
            gradeDetailsLink.Click();
            MarksheetGridHelper.GradesetDetailsSelector("Marks 0 - 6");
            // marksheetBuilder.CheckMarksheetIsAvailable();
            marksheetBuilder.Save();
            marksheetBuilder.SaveMarksheetAssertionSuccess();

            //Navigate to Marksheet Data Entry and check the marksheet is displayed
            SeleniumHelper.NavigatebackToMenu("Tasks", "Assessment", "Marksheets");
            WaitForAndClick(BrowserDefaults.TimeOut, By.LinkText(MarksheetTemplateName + " - " + selectedGroups[0]));
            Thread.Sleep(3000);

            AdditionalColumns addcolumn = new AdditionalColumns();

            addcolumn.ClickAdditionalColumns();
            addcolumn.SelectClassAdditionalColumns();
            addcolumn.ClickOk();
            addcolumn.ClickMarksheeyColumns();
            Thread.Sleep(2000);
            return(this);
        }