I have a scenario in my framework to get the row count and select one or multiple rows from the grid. Here, the class name and attributes are the same for all rows, the id is kept on changing for each row.
I've written this xpath to get header checkbox. However, it thrown stale element exception. I'm attaching the DOM here.