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

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Gradeset Data Maintainance Screen Page Object
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();

            string gradeSetName = gradesetdatamaintenance.GenerateRandomString(20);
            string gradeSetCode = gradesetdatamaintenance.GenerateRandomString(2);

            //Selecting the result type
            gradesetdatamaintenance = gradesetdatamaintenance.SelectGradesetOption("Marks");

            // Setting up the result type Name, Description, Minimum & Maximum values
            gradesetdatamaintenance.SetGradeSetName(gradeSetName);
            gradesetdatamaintenance.SetGradeSetDescription(gradeSetName + " Description");
            gradesetdatamaintenance.SetMinimumValue("1");
            gradesetdatamaintenance.SetMaximumValue("100");

            ////Saving the result type
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            WaitUntillAjaxRequestCompleted();
            gradesetdatamaintenance.SaveMarksheetAssertionSuccess();

            //// Deleting the result type.
            gradesetdatamaintenance = gradesetdatamaintenance.DeleteButtonClick();
            gradesetdatamaintenance = gradesetdatamaintenance.ContinueButtonClick();
            gradesetdatamaintenance.DeleteGrateSetAssertionSuccess();
        }
예제 #2
0
        public void ValidateGradeValues()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Gradeset Data Maintainance Screen Page Object
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();

            string gradeSetName = gradesetdatamaintenance.GenerateRandomString(20);
            string gradeSetCode = string.Empty;

            //Selecting the gradeset type
            gradesetdatamaintenance = gradesetdatamaintenance.SelectGradesetOption("Grade");

            // Setting up the Gradeset Name & Description
            gradesetdatamaintenance.SetGradeSetName(gradeSetName);
            gradesetdatamaintenance.SetGradeSetDescription(gradeSetName + " Description");

            //Setting up the Grades
            string instancePrefix = gradesetdatamaintenance.FindDefaultInstanceFieldPrefix();

            gradesetdatamaintenance.SetGradeRow(0, instancePrefix, gradeSetCode, gradeSetCode + " Description", "20");

            ////Saving the Gradeset
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            WaitUntillAjaxRequestCompleted();
            bool validationMessageExists = gradesetdatamaintenance.ValidationMessageAssertion();

            Assert.IsTrue(validationMessageExists, "Warning is expected");
        }
예제 #3
0
        public void DefaultGradesetVersionCreated()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();

            string gradeSetName = gradesetdatamaintenance.GenerateRandomString(20);
            string gradeSetCode = gradesetdatamaintenance.GenerateRandomString(2);

            //Selecting the gradeset type
            gradesetdatamaintenance = gradesetdatamaintenance.SelectGradesetOption("Grade");

            // Setting up the Gradeset Name & Description
            gradesetdatamaintenance.SetGradeSetName(gradeSetName);
            gradesetdatamaintenance.SetGradeSetDescription(gradeSetName + " Description");

            //Setting up the Grades
            string instancePrefix = gradesetdatamaintenance.FindDefaultInstanceFieldPrefix();
            string startDate      = gradesetdatamaintenance.GetStartDate();

            Assert.IsNotNull(startDate, "Start Date cannot be null for gradeset version created.");
        }
예제 #4
0
        public void EditGradesetCreateNewVersion()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Gradeset Data Maintainance Screen Page Object
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();

            string gradeSetName = gradesetdatamaintenance.GenerateRandomString(20);
            string gradeSetCode = gradesetdatamaintenance.GenerateRandomString(2);

            //Selecting the gradeset type
            gradesetdatamaintenance = gradesetdatamaintenance.SelectGradesetOption("Grade");

            // Setting up the Gradeset Name & Description
            gradesetdatamaintenance.SetGradeSetName(gradeSetName);
            gradesetdatamaintenance.SetGradeSetDescription(gradeSetName + " Description");

            //Setting up the Grades
            string instancePrefix = gradesetdatamaintenance.FindDefaultInstanceFieldPrefix();

            gradesetdatamaintenance.SetGradeRow(0, instancePrefix, gradeSetCode, gradeSetCode + " Description", "20", true);

            ////Saving the Gradeset
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            WaitUntillAjaxRequestCompleted();
            gradesetdatamaintenance.SaveMarksheetAssertionSuccess();

            //Add another Gradevalue.
            gradesetdatamaintenance = gradesetdatamaintenance.ClickAddGradeLink(instancePrefix);
            //Thread.Sleep(1000);
            gradesetdatamaintenance.SetGradeRow(1, instancePrefix, gradeSetCode + "_NEW", gradeSetCode + " Description 2", "5");
            ////Saving the Gradeset
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            gradesetdatamaintenance = gradesetdatamaintenance.SelectNewInstance();
            string newVersionStartDate = DateTime.Today.AddDays(2).ToShortDateString();

            //set start date
            gradesetdatamaintenance.SetNewVersionStartdate(newVersionStartDate);
            // button click to create new instance.
            gradesetdatamaintenance = gradesetdatamaintenance.ConfirmUpdateToExistingInstance();

            WaitUntillAjaxRequestCompleted();
            gradesetdatamaintenance.SaveMarksheetAssertionSuccess();

            string rowCount = gradesetdatamaintenance.GetGradesetInstanceRowCount();

            Assert.IsTrue(rowCount == "2");
        }
예제 #5
0
        public void AddGradesAcrossBaseDataSuppliedGradeset()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Create page object of marksheet Gradeset Search Panel
            GradesetSearchPanel gradesetsearchpanel = new GradesetSearchPanel();
            //Create page object of marksheet Gradeset Search Panel
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            //Enter Gradeset Name
            gradesetsearchpanel.SetGradeSetName("MIST");
            //Enter Gradeset Type
            gradesetsearchpanel.SetGradeSetType("Grade");
            //Click on Search Button
            gradesetsearchpanel = gradesetsearchpanel.Search(false);
            //Get The Searched GradesetName List
            gradesetdatamaintenance = gradesetsearchpanel.SelectGradesetByName("MIST Grades");
            //Setting up the Grades
            string instancePrefix = gradesetdatamaintenance.FindDefaultInstanceFieldPrefix();

            //Add another Gradevalue.
            gradesetdatamaintenance = gradesetdatamaintenance.ClickAddGradeLink(instancePrefix);
            string rowCount = gradesetdatamaintenance.getGradesetGradesRowCount();
            int    count    = Convert.ToInt16(rowCount);

            // Add a new grade and map it to an existing supplied grade.
            gradesetdatamaintenance.SetGradeRow(count - 1, instancePrefix, "Z", "F- Failed", string.Empty, false, "Average");
            //Saving the Gradeset
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            WaitUntillAjaxRequestCompleted();
            gradesetdatamaintenance.SaveMarksheetAssertionSuccess();
            rowCount = gradesetdatamaintenance.getGradesetGradesRowCount();
            // Assert that the new grade has been added to the grade collection.
            Assert.IsTrue(rowCount == "5");
            //delete the newly added grade
            gradesetdatamaintenance.ClickDeleteRowButton(count - 1);
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            WaitUntillAjaxRequestCompleted();
            gradesetdatamaintenance.SaveMarksheetAssertionSuccess();
            rowCount = gradesetdatamaintenance.getGradesetGradesRowCount();
            //Assert that the number of grades after deletion match the original grade count.
            Assert.IsTrue(rowCount == "4");
        }
예제 #6
0
        public void CancelButton()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();
            //Selecting the gradeset type
            gradesetdatamaintenance = gradesetdatamaintenance.SelectGradesetOption("Grade");
            //Click on Cancel
            gradesetdatamaintenance = gradesetdatamaintenance.ClickCancelButton();
            Assert.IsNull(gradesetdatamaintenance);
        }
예제 #7
0
        public void CheckGradesetOptions()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Gradeset Data Maintainance Screen Page Object
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();

            bool alltypesPresent = gradesetdatamaintenance.ValidateAllExpectedTypesArePresent();

            Assert.IsTrue(alltypesPresent, "All expected types are not present in dropdown selector");
        }
예제 #8
0
        public void SaveColourWithGrade()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator, true);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Gradeset Data Maintainance Screen Page Object
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            //  gradesetdatamaintenance = gradesetdatamaintenance.ClickToHideSearchCriateriaButton();
            //  Thread.Sleep(2000);
            gradesetdatamaintenance = gradesetdatamaintenance.ClickCreateButton();

            string gradeSetName = gradesetdatamaintenance.GenerateRandomString(20);
            string gradeSetCode = gradesetdatamaintenance.GenerateRandomString(2);

            //Selecting the gradeset type
            gradesetdatamaintenance = gradesetdatamaintenance.SelectGradesetOption("Grade");

            // Setting up the Gradeset Name & Description
            gradesetdatamaintenance.SetGradeSetName(gradeSetName);
            gradesetdatamaintenance.SetGradeSetDescription(gradeSetName + " Description");

            //Setting up the Grades
            string instancePrefix = gradesetdatamaintenance.FindDefaultInstanceFieldPrefix();

            gradesetdatamaintenance.SetGradeRow(0, instancePrefix, gradeSetCode, gradeSetCode + " Description", "20", true);

            ////Saving the Gradeset
            gradesetdatamaintenance = gradesetdatamaintenance.ClickSaveButton();
            WaitUntillAjaxRequestCompleted();
            gradesetdatamaintenance.SaveMarksheetAssertionSuccess();

            //// Deleting the Gradeset.
            gradesetdatamaintenance = gradesetdatamaintenance.DeleteButtonClick();
            gradesetdatamaintenance = gradesetdatamaintenance.ContinueButtonClick();
            gradesetdatamaintenance.DeleteGrateSetAssertionSuccess();
        }
예제 #9
0
        public void VerifyGradeSetDetails()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            SeleniumHelper.Login(SeleniumHelper.iSIMSUserType.AssessmentCoordinator);
            //Going to desired path
            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Result Types");
            //Create page object of marksheet Gradeset Search Panel
            GradesetSearchPanel gradesetsearchpanel = new GradesetSearchPanel();
            //Create page object of marksheet Gradeset Search Panel
            GradesetDataMaintenance gradesetdatamaintenance = new GradesetDataMaintenance();

            //Enter Gradeset Name
            gradesetsearchpanel.SetGradeSetName("MIST");
            //Enter Gradeset Type
            gradesetsearchpanel.SetGradeSetType("Grade");
            //Click on Search Button
            gradesetsearchpanel = gradesetsearchpanel.Search(false);
            //Get The Searched GradesetName List
            gradesetdatamaintenance = gradesetsearchpanel.SelectGradesetByName("MIST Grades");
            //List for storeing all the details of MIST Grades on the details screen
            List <string> GradesetDetails = new List <string>();

            //Adding each field on the Gradeset Details to the list
            GradesetDetails.Add(gradesetdatamaintenance.GetGradeSetName());
            //GradesetDetails.Add(gradesetdatamaintenance.GetGradeSetCode());
            GradesetDetails.Add(gradesetdatamaintenance.GetGradeSetType());
            gradesetdatamaintenance = gradesetdatamaintenance.ClickVersionLink();
            //GradesetDetails.Add(gradesetdatamaintenance.GetMinimumValue());
            //GradesetDetails.Add(gradesetdatamaintenance.GetMaximumValue());
            GradesetDetails.Add(gradesetdatamaintenance.GetStartDate());
            GradesetDetails.Add(gradesetdatamaintenance.GetEndDate());
            //Verifying all the gradeset details
            foreach (string eachelement in GradesetDetails)
            {
                Console.WriteLine(eachelement);
                Assert.IsTrue(TestData.GradeDetails.Contains(eachelement));
            }
        }
예제 #10
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();
        }