A table has 2 or more rows (depending on previous action) and the contents are not ordered. One of the column has unique elements. I need to select the row depending on the unique element using selenium webdriver (java). I am passing the locators using an excel sheet.
For eg, I have the following kind of table:
Select Name Id
Radio_button ABC Id1
Radio_button ABC Id2
Suppose for the above table, the order of the rows are not same all the time and depending on id value, I need to select the correct radio button. How do I identify the correct radio button depending on the id value?
Use xpath for finding your element:
This is a locator for Radio_button that is in the same row as id1.
If you provide your html code of the table, the answer will be more precisely, but the general idea is clear, I suppose.