I am trying to find the count of total row from table using below code but it's not working.
public IWebElement DocTable => driver.FindElement(By.XPath("//*[@id='ctl00_ContentPlaceHolder1_grdCaseList_DXMainTable']/tbody/tr"));
int RowCount = DocTable.Count();
Below is the error I am getting:
Error CS1061 'IWebElement' does not contain a definition for 'Count' and no accessible extension method 'Count' accepting a first argument of type 'IWebElement' could be found (are you missing a using directive or an assembly reference?)