I want to fetch data from tables in UI. I know about looping through rows and columns using \"tr\" and \"td\". But the one the table I have is something like this:
You could look for all children of tr element without differentiating between td and th. So instead of
List cells = row.findElements(By.tagName("td"));
I would use
List cells = row.findElements(By.xpath("./*"));