I am hoping someone can help me with this. I have a table which has two columns and can be any number of rows.
the table items are:
column 1 existing records
column 2: buttons to edit, delete, duplicate and other actions on the record in row 1
i have figured out how to locate the element in the table by using an xpath locator with a parameter that contains the text of the item i am looking for.
however locating that element only gives me the element in column 1, which cannot be actioned.
what i need to do once I locate my element, is find out what row it is on, so I can use the row number as a parameter to then click on the buttons to the right and be able to edit the item.
i think i can figure out how to identify the individual buttons in the column 2 cell, but i dont know how to find the row number i am on.
so basically i am identifying my xpath as:
[foundElement] //td[. = ‘{parameterContainingItemNameIWantToEdit}’]
which gives me an object that can be found and highlighted with the ‘find element’ magnifying glass.
how can i 'get [foundElement]‘s RowNumber’? i cant find any actions to do this for me?