How to automate testing tables
When automating tables you want to make sure you use the most stable and the easiest way to do it.
- When working with tables rely on relative locations
- When working with tables rely on table structure from an end-user’s perspective
by clicking on the “delete” button on the row with the unique id “spk2”
click on the second button to the right of "spk2"
click on the second button within the context of table at row containing "spk2" and column "Action"
Both ways would work even if the rendering of the table change from table-based rendering to div-based rendering like this one.
but also, there is barely any reliable way to refer to that element using XPath at all.
Would you like to try it yourself?
You can get a forever free account here.