By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,236 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,236 IT Pros & Developers. It's quick & easy.

Webtest/Xpath issue

P: 3

I'm writing test scripts in Canoo's WebTest. Basically, I need to run through a table of data and find an ID number for a specific case, then follow the link for that case's details page, which is located in a different cell along the same row. Xpath works in other test scripts I've written, finding links that exist always in the same location, but may have different urls driving them. Thank you for your help.

I want to use xpath to reference a link in a table cell based on the location of a cell containing a related string two columns to the right along the same row. To clarify:

<td><a href="link">link</a></td> <-- I want to point to a[1] in this cell
<td> </td>
<td>string</td> by referencing this string's td predicate -2

This is my xpath expression so far. It obviously doesn't work:

//td[contains(text(), 'string')-2]/a[1]
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,892
This isn't an HTML issue therefore you are posting in the wrong forum. You should post more code in the forum below:
Jun 28 '08 #2

Expert 100+
P: 1,892
What language are you using xpath with you seem to be a bit off as well.
Jun 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.