コード例 #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 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));
            }
        }