示例#1
0
        private Customstatements DisplayStatements()
        {
            NavigateToManageStatements();

            Customstatements customStatements = new Customstatements();

            //Select a level
            customStatements.SelectGroup("Year 2");
            //Select a Subject
            customStatements.SelectSubject("English: Writing");
            //Select a Strand
            customStatements.SelectStrand("Handwriting & Presentation");

            //Search for the statemenst based on the strand selected
            customStatements = customStatements.Search();

            MarksheetGridHelper.FindColumnByColumnName("Name");
            MarksheetGridHelper.FindColumnByColumnName("Description");
            MarksheetGridHelper.FindColumnByColumnName("Custom Description");
            MarksheetGridHelper.FindColumnByColumnName("Use Custom Description");
            List <IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("Custom Description");

            string entertext = "learning the grammar for years 2  English Appendix 2";

            columnList.First().Click();
            MarksheetGridHelper.GetTextAreEditor().SendKeys(entertext);
            MarksheetGridHelper.PerformEnterKeyBehavior();

            List <IWebElement> useSchoolDescriptionlist = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("Use Custom Description");

            useSchoolDescriptionlist.First().Click();
            customStatements.UseSchoolDescriptionClick(true);
            return(customStatements);
        }
示例#2
0
        public void DisplayPOSStatementsForSchoolExpectations()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            NavigateToManageStatements();

            ManageSchoolExpecations manageSchoolExpecations = new ManageSchoolExpecations();

            //Select a level
            manageSchoolExpecations.SelectGroup("Year 2");
            //Select a Subject
            manageSchoolExpecations.SelectSubject("English: Reading");
            //Select a Strand
            manageSchoolExpecations.SelectStrand("Comprehension");

            //Search for the statemenst based on the strand selected
            manageSchoolExpecations = manageSchoolExpecations.Search();

            MarksheetGridHelper.FindColumnByColumnName("Statement Name");
            MarksheetGridHelper.FindColumnByColumnName("Description");
            MarksheetGridHelper.FindColumnByColumnName("DFE Expected");
            List <IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("Threshold");

            columnList.First().Click();
            List <string> GradeDetails = new List <string>
            {
                "M"
            };

            for (int i = 0; i < GradeDetails.Count; i++)
            {
                MarksheetGridHelper.GetEditor().SendKeys(GradeDetails[i]);
                MarksheetGridHelper.PerformEnterKeyBehavior();
            }
        }
示例#3
0
        public void SaveSchoolExpectations()
        {
            WebDriverWait waiter = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(MarksheetConstants.Timeout));

            //Login
            NavigateToManageStatements();
            ManageSchoolExpecations manageSchoolExpecations = new ManageSchoolExpecations();

            //Select a level
            manageSchoolExpecations.SelectGroup("Year 2");
            //Select a Subject
            manageSchoolExpecations.SelectSubject("English: Reading");
            //Select a Strand
            manageSchoolExpecations.SelectStrand("Comprehension");

            //Search for the statemenst based on the strand selected
            manageSchoolExpecations = manageSchoolExpecations.Search();

            MarksheetGridHelper.FindColumnByColumnName("Statement Name");
            MarksheetGridHelper.FindColumnByColumnName("Description");
            MarksheetGridHelper.FindColumnByColumnName("DFE Expected");
            List <IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("Threshold");

            columnList.First().Click();
            List <string> GradeDetails = new List <string>
            {
                "S"
            };

            for (int i = 0; i < GradeDetails.Count; i++)
            {
                String presentValue = MarksheetGridHelper.GetEditor().GetValue();
                if (presentValue != "")
                {
                    break;
                }
                else
                {
                    MarksheetGridHelper.GetEditor().Clear();
                    MarksheetGridHelper.GetEditor().SendKeys(GradeDetails[i]);
                    MarksheetGridHelper.PerformEnterKeyBehavior();
                    manageSchoolExpecations.Save();
                    manageSchoolExpecations.waitforSavemessagetoAppear();
                }
            }

            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Programme of Study");
            //Search for a POS Marksheet
            POSSearchPannel possearchpanel = new POSSearchPannel();

            //Select a Group
            possearchpanel = possearchpanel.SelectGroup("Year 2");
            WaitUntillAjaxRequestCompleted();
            //Select a Subject
            possearchpanel = possearchpanel.SelectSubject("English: Reading");
            WaitUntillAjaxRequestCompleted();
            //Select a Strand
            possearchpanel = possearchpanel.SelectStrand("Comprehension");

            ////Select a Assessment Period
            //possearchpanel = possearchpanel.SelectAssessmentPeriod("Year 2 Autumn");
            ////Select a Year Group
            //possearchpanel = possearchpanel.OpenYearGroupSelectionDropdown("Year  2");
            //Click on Search Button
            POSDataMaintainanceScreen posdatamaintainance = possearchpanel.Search();

            Thread.Sleep(3000);

            //It checks whether a column by below name with School Expecattion exists
            List <IWebElement> columnListPOS1 = MarksheetGridHelper.FindCellsOfColumnByColumnNamePOSExpectation("En Compre S 2.01", "PoS & School Expectation");
        }
示例#4
0
        public void VerifyCustomSchoolDescription()
        {
            NavigateToManageStatements();

            Customstatements customStatements = new Customstatements();

            //Select a level
            customStatements.SelectGroup("Year 2");
            //Select a Subject
            customStatements.SelectSubject("English: Reading");
            //Select a Strand
            customStatements.SelectStrand("Word Reading");

            //Search for the statemenst based on the strand selected
            customStatements = customStatements.Search();

            MarksheetGridHelper.FindColumnByColumnName("Name");
            MarksheetGridHelper.FindColumnByColumnName("Description");
            MarksheetGridHelper.FindColumnByColumnName("Custom Description");
            MarksheetGridHelper.FindColumnByColumnName("Use Custom Description");
            List <IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("Custom Description");

            string entertext = MarksheetGridHelper.GenerateRandomString(10);

            columnList.First().Click();
            MarksheetGridHelper.GetTextAreEditor().SendKeys(entertext);
            MarksheetGridHelper.PerformEnterKeyBehavior();

            List <IWebElement> useSchoolDescriptionlist = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("Use Custom Description");

            useSchoolDescriptionlist.First().Click();
            customStatements.UseSchoolDescriptionClick(true);
            customStatements.Save();
            customStatements.waitforSavemessagetoAppear();

            AutomationSugar.NavigateMenu("Tasks", "Assessment", "Programme of Study");
            //Search for a POS Marksheet
            POSSearchPannel possearchpanel = new POSSearchPannel();

            //Select a View
            possearchpanel = possearchpanel.SelectView("Scheme");
            //Select a Scheme
            possearchpanel = possearchpanel.SelectScheme("DFE National Curriculum");
            //Select a Group
            possearchpanel = possearchpanel.SelectGroup("Year 2");
            //Select a Subject
            possearchpanel = possearchpanel.SelectSubject("English: Reading");
            //Select a Strand
            possearchpanel = possearchpanel.SelectStrand("Word Reading");

            //Click on Search Button
            POSDataMaintainanceScreen posdatamaintainance = possearchpanel.Search();

            IWebElement columnName = MarksheetGridHelper.FindColumnByColumnName("En Word Read S 2.01");

            string[] parts = columnName.Text.Split('\n');
            if (parts != null && parts[1] != null)
            {
                string[] columnDesc    = parts[1].Split('\r');
                string   textTocompare = entertext.Replace(" ", string.Empty).ToLower();

                Assert.IsTrue(columnDesc[0].Replace(" ", string.Empty).ToLower().Contains(textTocompare));
            }
        }