Hi Mick,

sorry but I do not understand why you would do that?

If you do have an xpath-expression tot he href-tag why would you not use

<clickLink description="Follow the link to the next page" xpath="<your xpath>" 
/>

Could you explain?

Yours

Michael Habbert


Von: [email protected] [mailto:[email protected]] Im 
Auftrag von Mick Knutson
Gesendet: Freitag, 12. März 2010 21:21
An: WebTest
Betreff: [Webtest] How can I get a value from XPath and use elsewhere in my 
test?

I have an XPath Value:
String FIRST_ITEM_XPATH = "text(//t...@class='listItem', first()]/a[first()])"


Here is the generated html on the page I am testing that I want to get:







                    <tbody>

                        <tr class="odd">







                            <td class="listItem"><a 
href="/divr/contextConfig/show/1<view-source:http://localhost:8080/divr/contextConfig/show/1>">1</a></td>







                            <td></td>

                            <td>performDeviceRefreshBySerialNumber_CTIMEOUT</td>







                            <td>10</td>

                            <td></td>







                        </tr>


Basically, I want the Name of the first link so I can click that link.

How can I assign this to a variable, then us it like:

clickLink(label:'${firstLink}') // or something like this...?



---
Thank You...

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://www.baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---


Michael Habbert
Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 Karlsruhe | Germany | 
www.key-work.de<http://www.key-work.de>
Fon: +49-721-78203-269 | E-Mail: 
[email protected]<mailto:[email protected]> | Fax: 
+49-721-78203-10

Key-Work Consulting GmbH, Karlsruhe, HRB 108695, HRG Mannheim
Geschäftsführer: Andreas Stappert, Tobin Wotring

Reply via email to