You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to seleniu...@googlegroups.com
Hi,
I am using Selenium IDE to create a test that creates an insurance policy. After the policy has been finalised there are links to display the certificate of cover.
Which I can execute by using the command click | //span[@id='r114282']. But the r number is unique for every policy. So I need to be able to extract it from the HTML below and store in a variable. I'm not sure what Selenium IDE command to use. I know I can use the storeText command with '//div[@class='section']/a[2]/span[@id]' in the target section to get the text inside the span tag, but its the id attribute r114282 that I want.
Do I use the storeAttribute command? I'm not sure how to write it.
<a class="external" target="_blank" href="/anzn/coc/r114282/certificate_of_currency.html"> <span id="r114282"> Certificate of Currency - Home - 48 SHORTLAND STREET AUCKLAND CENTRAL AUCKLAND 1010 </span> </a>
Any help would be greatly appreciated.
Thanks.
Tam.
Tarun Kumar
unread,
May 2, 2012, 1:20:50 AM5/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to seleniu...@googlegroups.com
Try this -
<tr>
<td>storeAttribute</td>
<td>//div[@class='section']/a[2]/span@id</td>
<td>x</td>
</tr>
<tr>
<td>echo</td>
<td>${x}</td>
<td></td>
</tr>
Here - //div[@class='section']/a[2]/span is your element locator and id is the attribute you want.