Example #1
0
        public IEnumerable <string> GetRowValues(int rowIndex)
        {
            var selector = $"tr:nth-child({rowIndex}) td div";
            var cells    = UsersTable.FindElements(By.CssSelector(selector));
            var values   = cells.Select(c => c.Text);

            return(values);
        }
Example #2
0
        public IEnumerable <string> GetColumnValues(int columnIndex)
        {
            var selector = $"tr td:nth-child({columnIndex}) div";
            var cells    = UsersTable.FindElements(By.CssSelector(selector));
            var values   = cells.Select(c => c.Text);

            return(values);
        }
Example #3
0
        public int GetColumnIndex(UserListColumn columnName)
        {
            var columns = UsersTable.FindElements(By.CssSelector("th > div > div"));
            var i       = 1;

            foreach (var column in columns)
            {
                var text = column.Text.Trim();
                if (text == columnName.Name)
                {
                    return(i);
                }
                i++;
            }
            return(-1);
        }