/// <summary>
 /// Constructs a new TableInterface object
 /// Warning: If the page updates, TableInteface objects made using this constructor will break
 /// </summary>
 /// <param name="table">The table element</param>
 /// <param name="driver">The current WebDriver</param>
 /// <param name="numColumns">The manual override for the number of columns</param>
 public TableInterface(IWebElement table, ConcreteDriver driver, int numColumns)
 {
     tableFromId     = false;
     tableByElement  = table;
     this.driver     = driver;
     this.numColumns = numColumns;
 }
Beispiel #2
0
 public static void InitializePages(string driverName)
 {
     driver = new ConcreteDriver(driverName);
     //validation = new Validation(new Logger("Testing123"));
     absolutePath = new Uri(Environment.CurrentDirectory.ToString() + @"\..\..\..\..").LocalPath.ToString();
     random       = new Random();
     reference    = new ReferenceData(absolutePath);
     wait         = new WebDriverWait(driver, TimeSpan.FromSeconds(5));
 }
 /// <summary>
 /// Constructs a new TableInterface object using a manual override for the number of columns. Useful
 /// when the number of columns can't be determined from the column titles.
 /// </summary>
 /// <param name="tableId">The element Id of the desired table</param>
 /// <param name="driver">The current WebDriver to be used to get the table</param>
 /// <param name="numColumns">The manual override for the number of columns</param>
 public TableInterface(string tableId, ConcreteDriver driver, int numColumns)
 {
     this.tableId    = tableId;
     this.driver     = driver;
     this.numColumns = numColumns;
 }
 /// <summary>
 /// Constructs a new TableInterface object
 /// </summary>
 /// <param name="tableId">The element Id of the desired table</param>
 /// <param name="driver">The current WebDriver to be used to get the table</param>
 public TableInterface(string tableId, ConcreteDriver driver)
 {
     this.tableId = tableId;
     this.driver  = driver;
     numColumns   = this.Table.FindElements(By.TagName("tr"))[0].FindElements(By.TagName("th")).Count;
 }