<table id="gvSomething" class="mGrid" cellspacing="0" style="border-collapse:collapse;">
<tbody>
<tr>
<th scope="col">
<a id="CODE">code no.</a>
<th scope="col">
<a id="NAME">name</a>
<th scope="col">
<a id="STATUS">active</a>
<th scope="col"> CONTROL </th>
</tr>
<tr>
<td align="center">
<span id="Code_0">12345</span>
</td>
<td>
<span id="Name_0">zero</span>
</td>
<td valign="middle" align="center">
<span id="Status_0">Yes</span>
</td>
<td valign="middle" align="center">
<input id="Edit_0" type="image" src="../Images/Edit.gif" title="Edit Record" name="Status$ctl02$imbEdit">
<input id="Delete_0" type="image" src="../Images/Delete.gif" title="Delete Record" name="Delete$ctl02$imbDelete">
</td>
</tr>
<tr>
<td align="center">
<span id="Code_1">098765</span>
</td>
<td>
<span id="Name_1">one</span>
</td>
<td valign="middle" align="center">
<span id="Status_1">Yes</span>
</td>
<td valign="middle" align="center">
<input id="Edit_1" type="image" src="../Images/Edit.gif" title="Edit Record" name="Status$ctl03$imbEdit">
<input id="Delete_1" type="image" src="../Images/Delete.gif" title="Delete Record" name="Delete$ctl03$imbDelete">
</td>
</tr>
</tbody>
</table>
</div>
Hi,
You can use xpath to reach each element and then use getattribute (id) to that element so that now you have id value , now in if you can chek wether last charter is 0 or 1 and do the secifix axtion.
Regards,
Nitin Lomte.
use this xpath, use loop to iterate through it.
ele_object=//table[@id='gvSomething']/tbody/tr[2]/td/span
ele_object=get_attribute('id')
get_attribute() is python syntax search for java syntax
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0919e163-61d2-43e9-8ed5-bc8728aeddbb%40googlegroups.com.