Example #1
0
        public static HtmlCell GetHTMLTableControl(string rowIndex, string columnIndex)
        {
            var cell = new HtmlCell(browserWindow);

            try
            {
                cell.SearchProperties.Add(CSVReader.ControlType + ".PropertyNames." + CSVReader.LocatorType, CSVReader.LocatorValue);
                //give the required row and column number
                cell.FilterProperties[HtmlCell.PropertyNames.RowIndex]    = rowIndex;
                cell.FilterProperties[HtmlCell.PropertyNames.ColumnIndex] = columnIndex;
                cell.WaitForControlEnabled();
                cell.WaitForControlReady();
            }
            catch (Exception)
            {
                Assert.Fail("Failed to find " + CSVReader.ControlType + " (Table) Element - Element not Found");
            }
            var cellCollection = cell.FindMatchingControls();
            //cast the uitestcontrol to htmlcell
            var desiredcell = (HtmlCell)cellCollection[0];

            return(desiredcell);
        }
Example #2
0
 public static HtmlCell GetHTMLTableControl(string rowIndex, string columnIndex)
 {
     var cell = new HtmlCell(browserWindow);
     try
     {
         cell.SearchProperties.Add(CSVReader.ControlType + ".PropertyNames." + CSVReader.LocatorType, CSVReader.LocatorValue);
         //give the required row and column number
         cell.FilterProperties[HtmlCell.PropertyNames.RowIndex] = rowIndex;
         cell.FilterProperties[HtmlCell.PropertyNames.ColumnIndex] = columnIndex;
         cell.WaitForControlEnabled();
         cell.WaitForControlReady();
     }
     catch (Exception)
     {
         Assert.Fail("Failed to find " + CSVReader.ControlType + " (Table) Element - Element not Found");
     }
     var cellCollection = cell.FindMatchingControls();
     //cast the uitestcontrol to htmlcell
     var desiredcell = (HtmlCell)cellCollection[0];
     return desiredcell;
 }