Exemplo n.º 1
0
 public override void SetRowLists()
 {
     base.SetRowLists();
     int rowIndex = 0;
     foreach (var webElement in WebElementRows)
     {
         Report.Write("GridRow by index: " + rowIndex);
         GridRowType rowType = GetGridRowType(rowIndex);
         Report.Write("GridRowType: " + rowType);
         var lineItem = new ProfileHomeTabRow(gridCssSelector, webElement, rowIndex, rowType, ColumnList, ControlPrefix);
         RowList.Add(lineItem);
         rowIndex++;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// gets a list of rows containing the text to find from the row list
 /// </summary>
 /// <param name="columnName">the column name</param>
 /// <param name="textToFind">the text to find</param>
 /// <returns>list of GridRow</returns>
 public new List<ProfileHomeTabRow> GetsRowsContainingTextToFindFromList(string columnName, string textToFind)
 {
     if (RowList.Count == 0)
     {
         Assert.Fail("No items were found in the search results column list.");
         return null;
     }
     else
     {
         List<ProfileHomeTabRow> rowList = new List<ProfileHomeTabRow>();
         string text = null;
         int index = 0;
         foreach (var row in RowList)
         {
             ProfileHomeTabRow assessDashboardTabRow = (ProfileHomeTabRow)row;
             //get the text by column name
             if (columnName.Equals(ProfileHomeTabColumnNames.Actions))
             {
                 text = assessDashboardTabRow.GetActions();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.Assigned))
             {
                 text = assessDashboardTabRow.GetAssigned();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.CollectionStatus))
             {
                 text = assessDashboardTabRow.GetCollectionStatus();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.Grade))
             {
                 text = assessDashboardTabRow.GetGrade();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.GradebookUpdated))
             {
                 text = assessDashboardTabRow.GetGradebookUpdated();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.OnlinePasscode))
             {
                 text = assessDashboardTabRow.GetOnlinePasscode();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.Stage))
             {
                 text = assessDashboardTabRow.GetStage();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.StartDate))
             {
                 text = assessDashboardTabRow.GetStartDate();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.StudentPerformance))
             {
                 text = assessDashboardTabRow.GetStudentPerformance();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.Subject))
             {
                 text = assessDashboardTabRow.GetSubject();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.TestCategory))
             {
                 text = assessDashboardTabRow.GetTestCategory();
             }
             if (columnName.Equals(ProfileHomeTabColumnNames.TestName))
             {
                 text = assessDashboardTabRow.GetTestName();
             }
             //if the text is not null
             if (text != null)
             {
                 //if the text contains the text to find
                 if (text.Contains(textToFind))
                 {
                     rowList.Add(assessDashboardTabRow);
                 }
             }
         }
         //may return empty row list if text is not found
         return rowList;
     }
 }