How can I create a variable that has the id from one of my records on the index page?
I can use xpath to get at the anchor I want with:
storeText
//table[@id='districts']//tr/td/a[text()='Fairview Union']
id_of_another_district
but that gets the link name. I want to id for that record, i.e. in the original source code I have:
<tr>
<td>
<a href="/districts/31">Fairview Union</a>
<span class='small'><a href="/users/change_district/31">(Select)</a></span>
</td>
<td></td>
<td></td>
<td></td>
<td class='rightalign'>01/09/2012</td>
<td></td>
<td><a href="/districts/31/overview" class="report_link right"></a></td>
<td><a href="/districts/31" class="deleteicon" data-confirm="Are you sure you want to delete all data and schedules for Fairview Union?" data-method="delete" rel="nofollow" title="Delete Fairview Union"><img alt="Delete" src="/assets/icons/delete-a77f3c3c125b0817085648f284c98938.png" /></a></td>
</tr>
and what I want to get and store in a variable in selenium is the record number 31