I have a table that contains multiple rows and columns.
I need to locate an element in column one that lies in the same row with a particular element in colum two.
Here is apart of HTML
<tr>
<td element1>
</td>
<td element2>
</td>
</tr>
<tr>
<td element3>
</td>
<td element4>
</td>
</tr>
Elements: element1 and element3 have absolutely the same HTML. The only thing that I can use to differentiate between them is their sibling elements: element3 and element4.
I need to locate element3 BECAUSE it is a sibling of element 4. So first I need to narrow down my search to element that are in the same row <tr
as element4. Then, I can locate element3. How can I do this?
PS: I cannot use .get(2)
or tr[2] ... etc. But I can navigate element2 and element 4 individually