what about:
<storeXPath "//span[text() = 'Third item in list ']/@id" property="foo"/>

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com

Mart Toom wrote:
> Hi,
> 
> I have an application that is similar to shopping chart where you add
> items to the list.
> But unfortunately the location of the item in list is not consistent and
> may change when you add next items (sorted by name). So new item may get
> in the middle of item list.
> 
> What I need, is to verify item value. I know item name and can find it
> by <verifyText> step.
> Is it possible somehow to extract the htmlId of this text field element?
> From this htmlId I can get the item id in the list and search for the
> value field.
> 
> The HTML source looks similar to this:
> 
> <table>
>                   <tr>
>                      <td colspan="3"><span id="list1"
> class="output">Shopping list</span></td>
>                   </tr>
>                   <tr>
>                      <td></td>
>                      <td></td>
>                      <td ></td>
> 
>                      <td ></td>
>                      <td><span id="itemName13">First item in list </span>
>                      </td>
>                      <td ><span id="itemValue13"
> class="output">10</span></td>
>                      <td ><span id="itemValueAfterCalculations13"
> class="output">16.0</span></td>
>                   </tr>
> 
>                   <tr>
>                      <td></td>
>                      <td></td>
>                      <td ></td>
> 
>                      <td ></td>
>                      <td><span id="itemName15">Third item in list </span>
>                      </td>
>                      <td ><span id="itemValue15"
> class="output">110</span></td>
>                      <td ><span id="itemValueAfterCalculations15"
> class="output">116.0</span></td>
>                   </tr>
> 
>                   <tr>
>                      <td></td>
>                      <td></td>
>                      <td ></td>
> 
>                      <td ></td>
>                      <td><span id="itemName14">Second item in list </span>
>                      </td>
>                      <td ><span id="itemValue14"
> class="output">110</span></td>
>                      <td ><span id="itemValueAfterCalculations14"
> class="output">116.0</span></td>
>                   </tr>
>  </table>
> 
> Thanks for any hint,
> 
> Mart
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to