/// <summary> /// Sets the Rows List /// </summary> public override void SetRowLists() { base.SetRowLists(); int rowIndex = 0; for (int i = 0; i < WebElementRows.Count; i++) { Report.Write("GridRow by index: " + rowIndex); //GridRowType rowType = GetGridRowType(rowIndex); GridRowType rowType = GridRowType.Data; if (i == 0) { rowType = GridRowType.Header; } bool lastRow = false; if (i == WebElementRows.Count - 1) { lastRow = true; } Report.Write("GridRowType: " + rowType); var lineItem = new BenchmarkTestsTabOneTestViewRow(gridCssSelector, WebElementRows[i], rowIndex, rowType, lastRow, ColumnList, ControlPrefix); RowList.Add(lineItem); rowIndex++; } }
public virtual GridRowType GetGridRowType(int rowIndex) { GridRowType rowType = GridRowType.Data; //if 1st row if (rowIndex == 0) { //if has pagination if (HasPaginationRows == true) { //then pagination row rowType = GridRowType.Pagination; }//or else NO pagination else { //if has header if (HasHeaderRow == true) { //then header row rowType = GridRowType.Header; }//or else NO header else { //then data row rowType = GridRowType.Data; } } }//if 2nd row if (rowIndex == 1) { //if has pagination if (HasPaginationRows == true) { //if has header if (HasHeaderRow == true) { //then header row rowType = GridRowType.Header; }//or else NO header else { //then data row rowType = GridRowType.Data; } }//or else NO pagination else { //then data row, not header row rowType = GridRowType.Data; } }//if last row if (rowIndex == (WebElementRows.Count - 1)) { //if has pagination if (HasPaginationRows == true) { //then pagination row rowType = GridRowType.Pagination; }//or else NO pagination else { //then data row rowType = GridRowType.Data; } } return(rowType); }
/// <summary> /// Sets the Rows List /// </summary> public override void SetRowLists() { base.SetRowLists(); int rowIndex = 0; foreach (var webElement in WebElementRows) { GridRowType rowType = GetGridRowType(rowIndex); var lineItem = new TestCentralHomeRow(gridCssSelector, webElement, rowIndex, rowType, ColumnList, ControlPrefix); RowList.Add(lineItem); rowIndex++; } }
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++; } }
/// <summary> /// Sets the Rows List /// </summary> public override void SetRowLists() { base.SetRowLists(); int rowIndex = 0; //last row is not part of the grid. so use count - 1 to disclude it. for (int i = 0; i < WebElementRows.Count - 1; i++) { Report.Write("GridRow by index: " + rowIndex); GridRowType rowType = GetGridRowType(rowIndex); Report.Write("GridRowType: " + rowType); var lineItem = new BenchmarkELARow(gridCssSelector, WebElementRows[i], _gridIndex, rowIndex, rowType, ColumnList, ControlPrefix); RowList.Add(lineItem); rowIndex++; } }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public SNGridRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base() { DriverCommands = new SNDriverCommands(); if (overrideControlPrefix != null) { this.ControlPrefix = overrideControlPrefix; } this.gridCssSelector = gridCssSelector; Element = webElement; Index = index; Type = type; Columns = columns; Report.Write("GridRow Index: " + Index + ", Type: " + Type); InitElements(); }
/// <summary> /// Gets the Row type of the Specified Row. /// </summary> /// <param name="rowIndex"></param> /// <returns></returns> public override GridRowType GetGridRowType(int rowIndex) { GridRowType rowType = GridRowType.Data; //if 1st row if (rowIndex == 0) { //if has header if (HasHeaderRow == true) { //then header row rowType = GridRowType.Header; }//or else NO header else { //then data row rowType = GridRowType.Data; } } return(rowType); }
private bool GridHasValues(Ice.Lib.Framework.EpiUltraGrid grd) { //This method loops through the grdSigners and makes sure there is at least 1 value bool hasValues = false; int rowCount = 0; GridRowType rowTypes = GridRowType.DataRow; UltraGridBand band = grd.DisplayLayout.Bands[0]; var enumerator = band.GetRowEnumerator(rowTypes); foreach (UltraGridRow row in enumerator) { //MessageBox.Show(String.Format("Signers: {0}",row.Cells[0].Value.ToString())); rowCount++; } if (rowCount > 0) { hasValues = true; } return(hasValues); }
public void DebugSetGridLists() { int columnIndex = 0; foreach (var webElement in WebElementColumns) { //Debug.WriteLine("GridColumn by index: '{0}'.", columnIndex); var lineItem = new SNGridColumn(gridCssSelector, webElement, columnIndex, ControlPrefix); ColumnList.Add(lineItem); columnIndex++; } int rowIndex = 0; foreach (var webElement in WebElementRows) { //Debug.WriteLine("GridRow by index: '{0}'.", rowIndex); GridRowType rowType = GetGridRowType(rowIndex); //Debug.WriteLine("GridRowType: '{0}'.", rowType); var lineItem = new SNGridRow(gridCssSelector, webElement, rowIndex, rowType, ColumnList, ControlPrefix); RowList.Add(lineItem); rowIndex++; } }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public BenchmarkTestsTabOneTestViewRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, bool lastRow, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { //ctl00_MainContent_StudentProfileDetailControl_ctl07_BenchmarkTestAnalysisControl_DataGridQuestions _lastRow = lastRow; //initElements(); }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="type">type of the Row</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public ViewPortalInProgressTestResultsRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public TestCentralHomeRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { //Assign to sections //ctl00_MainContent_GridAvailableSections //Assign to individual students //ctl00_MainContent_GridAvailableStudents }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public ViewAssignmentSummaryRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { }
/// <summary> /// the constructor /// </summary> /// <param name="driver">IWebDriver</param> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public BenchmarkELARow(string gridCssSelector, IWebElement webElement, int gridIndex, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { //ELA grid id: SubjectGroup0 _gridIndex = gridIndex; //InitElements(); }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public PlanHomeRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { //ctl00_MainContent_TestWindowSearchResults1_TestWindowFinderResults1_gridResults }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="type">type of the Row</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public AttendanceGroupRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { }
/// <summary> /// the constructor /// </summary> /// <param name="gridCssSelector">the grid CSS Selector</param> /// <param name="webElement">IWebElement</param> /// <param name="index">the index</param> /// <param name="type">type of the Row</param> /// <param name="columns">the list of columns</param> /// <param name="overrideControlPrefix">override control prefix</param> public ProfileHomeScheduledTestsRow(string gridCssSelector, IWebElement webElement, int index, GridRowType type, List <SNGridColumn> columns, string overrideControlPrefix = null) : base(gridCssSelector, webElement, index, type, columns, overrideControlPrefix) { }