Esempio n. 1
0
        /// <summary>
        /// Returns an <seealso cref="IWebElement"/> that represents the cell of the specified rowIndex and columnIndex in this table (i.e., a &lt;tr&gt; element).
        /// </summary>
        /// <exception cref="NoSuchElementException"> if this table is still not visible (default) or does not exist
        ///            after the <seealso cref="WebUI.DefaultImplicitWaitTimeout default implicit wait timeout"/> is reached,
        ///            or if this table does not have a row at the specified rowIndex,
        ///            or if the specified row does not have a cell at the specified columnIndex </exception>
        /// <exception cref="StaleElementReferenceException">Thrown when the <seealso cref="IWebElement"/> of this table becomes invalid
        ///            (unlikely unless the HTML tag of this table is refreshed while this method is invoked).</exception>
        protected virtual IWebElement GetCellElement(int rowIndex, int columnIndex)
        {
            IWebElement rowElement = GetRowElement(rowIndex);

            return(TableHelper.FindCellElement(rowElement, columnIndex));
        }
Esempio n. 2
0
        /// <summary>
        /// Returns a <seealso cref="TableCell"/> that represents the cell of the specified columnIndex in this table row.
        /// </summary>
        /// <exception cref="NoSuchElementException"> Thrown if this table row does not have a cell at the specified columnIndex. </exception>
        /// <exception cref="StaleElementReferenceException">Thrown if the <seealso cref="IWebElement"/> of this table row becomes invalid.</exception>
        public virtual TableCell GetCell(int columnIndex)
        {
            IWebElement cellElement = TableHelper.FindCellElement(WebElement, columnIndex);

            return(new TableCell(cellElement, Index, columnIndex));
        }