コード例 #1
0
        public int GetNumberOfSearchResults()
        {
            var rows = SearchResultsTable.FindElement(By.TagName("tbody"))
                       .FindElements(By.TagName("tr"));

            return(rows.Count);
        }
コード例 #2
0
        public void ClickSearchResultAddButtonForRow(int index)
        {
            var tbody = SearchResultsTable.FindElement(By.TagName("tbody"));
            var rows  = tbody.FindElements(By.TagName("tr"));

            if (rows.Count > index)
            {
                rows[index].FindElement(By.CssSelector(".add-to-cart-button")).Click();
            }
        }
コード例 #3
0
        public void ClickSearchResults(int index)
        {
            var tbody = SearchResultsTable.FindElement(By.TagName("tbody"));
            var rows  = tbody.FindElements(By.TagName("tr"));

            if (rows.Count > index)
            {
                rows[index].Click();
            }
        }