java - How to click a button from a table where all classes have the same name -
<tbody> <tr class="b"> <td class="t_l">betmatrix</td> <td class="t_l"> <td class="t_r">dsdfsf</td> <td class="t_r">none</td> <td class="t_r">all</td> <td class="t_r">none</td> <td class="t_r">all</td> <td class="t_r">all</td> <td class="t_r">none</td> <td class="t_r">all</td> <td class="t_r">not required</td> <td class="t_r">1.11</td> <td class="t_r">all user</td> <td class="t_r">0.00</td> <td class="t_r">2014-09-05</td> <td class="t_r">2014-09-15</td> <td class="t_r">2014-09-05</td> <td class="t_r">1-admin</td> <td class="t_r"> <td class="t_r">0.00</td> <td class="t_r">0.00</td> <td class="t_r"> <td class="t_r"> <a onclick="showbonusmodificationlogs(53599)" href="#">history</a> </td> </tr> <tr class="a"> <tr class="b"> <tr class="a"> </tbody>
this table structure have, , there no way can search specific items in table.
how can find element in row , click on button @ end of row if found?
in example need search word: dsdfsf
it easier other tables because classnames different. same method not work here.
as @alecxe pointed out, can use xpath. there hundred different ways of doing this. match requirements use: //tr[td[text()='dsdfsf']]/td/a
. says: row has column text 'dsdfsf', locate column anchor tag.
Comments
Post a Comment