public void GenerateTopicTemplate() { NavigateToManageTopics(); TopicDataMaintainance topicdatamaintainance = new TopicDataMaintainance(); // Create New Topic topicdatamaintainance = topicdatamaintainance.ClickCreateButton(); // Generating Basice Details string topicName = "Selenium Test Topic " + topicdatamaintainance.GenerateRandomString(10); topicdatamaintainance.SetTopicName(topicName); topicdatamaintainance.SetTopicDescription(topicName + " Description"); SeleniumHelper.ChooseSelectorOption(topicdatamaintainance.TopicYearDropdownInitiator, YearGroupSelected); SeleniumHelper.ChooseSelectorOption(topicdatamaintainance.TopicTermDropdownInitiator, TermSelected); //////Saving the Topic topicdatamaintainance = topicdatamaintainance.ClickDialogOkButton(); topicdatamaintainance.SaveTopicSuccess(); Thread.Sleep(3000); //Select Statement topicdatamaintainance.SelectStatement(5); //Allocate Statement topicdatamaintainance.AllocateStatmentByName(topicName); //Generate Template for created Topic topicdatamaintainance = topicdatamaintainance.SelectTopicDropDownByName(topicName); topicdatamaintainance.GenerateTemplateSelecteTopicClick(topicName); //Open Marksheet topicdatamaintainance.OpenPosTemplate(topicName); POSDataMaintainanceScreen posDataMaintainanceScreen = new POSDataMaintainanceScreen(); posDataMaintainanceScreen.SearchFilterButtonClick(); posDataMaintainanceScreen.SelectMarksheetColumnName("En Reading Comp Stat 1.01"); List <IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnNameForPOS("En Reading Comp Stat 1.01"); }
public void WalesSavePOSMarksheet() { NavigateToPOSMarksheet(); //Search for a POS Marksheet POSSearchPannel possearchpanel = new POSSearchPannel(); //Select a Group possearchpanel = possearchpanel.SelectGroup("Year 1"); //Select a Subject possearchpanel = possearchpanel.SelectSubject("Literacy : Reading : Response & analysis"); //Select a Strand possearchpanel = possearchpanel.SelectStrand("Responding to what has been read"); //Select a Assessment Period possearchpanel = possearchpanel.SelectAssessmentPeriod("Year 1 Autumn"); //Select a Year Group possearchpanel = possearchpanel.OpenYearGroupSelectionDropdown("Year 1"); Thread.Sleep(1500); //Click on Search Button POSDataMaintainanceScreen posdatamaintainance = possearchpanel.Search(); Thread.Sleep(8000); POSToolbar postoolbar = new POSToolbar(); postoolbar = postoolbar.OpenToggleMenuList(); posdatamaintainance = postoolbar.ClickSubjectSummativecolumnsToggleOption(false); posdatamaintainance = postoolbar.ClickSummativecolumnsToggleOption(false); posdatamaintainance = postoolbar.ClickSummarycolumnsToggleOption(false); // posdatamaintainance.SelectMarksheetColumnName("Lit - Reading - Response and analysis 1.RA2"); List <IWebElement> columnList = MarksheetGridHelper.FindCellsOfColumnByColumnName("Lit - Reading - Response and analysis 1.RA2"); columnList.First().Click(); List <string> GradeDetails = new List <string> { "Y", "D", "N" }; for (int i = 0; i < GradeDetails.Count; i++) { MarksheetGridHelper.GetEditor().SendKeys(GradeDetails[i]); MarksheetGridHelper.PerformEnterKeyBehavior(); } // POSToolbar postoolbar = new POSToolbar(); postoolbar.ClickSaveButton(); postoolbar.waitforSavemessagetoAppear(); //Reload the results again by clicking on search to verify results are persisted columnList.Clear(); posdatamaintainance.SearchFilterButtonClick(); possearchpanel.Search(); columnList = MarksheetGridHelper.FindCellsOfColumnByColumnName("Lit - Reading - Response and analysis 1.RA2"); columnList.First().Click(); for (int i = 0; i < GradeDetails.Count; i++) { String getCellValue = MarksheetGridHelper.GetEditor().GetValue(); Assert.AreEqual(getCellValue, GradeDetails[i]); MarksheetGridHelper.GetEditor().Clear(); MarksheetGridHelper.PerformEnterKeyBehavior(); } postoolbar.ClickSaveButton(); postoolbar.waitforSavemessagetoAppear(); }