You will notice that the predicate, [107], does not match the element named 107, but instead searches for the 107th element.
You might want to try a tool like Webtest recorder, that will give you the xpath value for you. What also might be wrong is your .../td/td. This is saying that td is a child element of td. Which is wrong. You might want //div/31/../../td/[EMAIL PROTECTED]'viewreport.v'] or something like that. Personally I'd place an id tag inside the <tr> to make your life easier. Something like <tr id='31'> turns the xpath into //[EMAIL PROTECTED]'31']//tr/[EMAIL PROTECTED] Hope I helped. Big Mike ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Deepa Nigam Sent: Wednesday, April 23, 2008 12:11 AM To: [EMAIL PROTECTED] Subject: RE: [Webtest] Testing random values on the page Removing the single quotes gives error: null failed with message "xpath test: //tr/td[107] matched no nodes" ________________________________ Subject: RE: [Webtest] Testing random values on the page From: [EMAIL PROTECTED] To: [email protected]; [EMAIL PROTECTED] Date: Tue, 22 Apr 2008 15:46:51 -0700 The problem is probably the single quotes around the 31 in <//tr/td[ '31' ]/td/[EMAIL PROTECTED]'viewreport.v']>" Try to remove them from xpath="//tr/td['#myRandomNumber']"/> and from xpath="//tr/td['#{myRandomNumber}']/td/[EMAIL PROTECTED]'viewreport.v']" George ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Deepa Nigam Sent: Tuesday, April 22, 2008 2:51 PM To: [email protected] Subject: RE: [Webtest] Testing random values on the page Hi, After reading XPath document and referring to storeXPath Element from Canoo Webtest, this is how I am trying to invoke the url viewreport.v for Reference#, but I get the following error. I am unable to figure out, can someone please help ! null failed with message "No match for xpath expression <//tr/td['31']/td/[EMAIL PROTECTED]'viewr eport.v']>" The snippet from the target: <verifyXPath xpath="//tr/td['#myRandomNumber']"/> <storeXPath description="Click View Report Link" xpath="//tr/td['#{myRandomNumber}']/td/[EMAIL PROTECTED]'viewreport.v']" property="uri"/> HTML looks like: <tr> <td class="info-header"> <a href="#" onClick="sortby('Reference')" >Reference #</a> </td> <td class="info-header"> <div class="sortarrow"> <a href="#" onClick="sortby('DateSubmitted')" >Date Submitted</a> <img src="common/images/sortarrow.gif"/> </div> </td> <td class="info-header"> <a href="#" onClick="sortby('Activity')" >Activity</a> </td> <td class="info-header">Action</td> </tr> <tr class="even"> <td class="info-value-rightborder"><div class="fixedwidth-medium">62</div></td> <td class="info-value-center-rightborder">04/22/2008, 12:41 AM</td> <td class="info-value-center-rightborder"> <a href="viewreport.v">View Report</a></td> </tr> ________________________________ Subject: RE: [Webtest] Testing random values on the page From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Date: Tue, 22 Apr 2008 13:16:07 -0500 You can always use xpath... There are multiple tutorials about xpath on the bottom of the following link. http://webtest.canoo.com/webtest/manual/annotatedRefs.html ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Deepa Nigam Sent: Tuesday, April 22, 2008 1:13 PM To: dav Cc: [EMAIL PROTECTED] Subject: RE: [Webtest] Testing random values on the page But I am not trying to click on the link, trying to test the value. There is no id associated to these random values. <td class="info-value-rightborder"><div > > class="fixedwidth-medium">65</div></td> Link1 Link2 Link3 65 val2 val3 > Subject: Re: [Webtest] Testing random values on the page > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: [email protected] > Date: Tue, 22 Apr 2008 20:08:34 +0200 > > > Hello, > > ClickLink (http://webtest.canoo.com/webtest/manual/clickLink.html) don't > answer to your need ? > > david. > -- > > > Le mardi 22 avril 2008 à 10:47 -0700, Deepa Nigam a écrit : > > Hi, > > > > I have an application which has multiple links and each link has a > > value associated > > > > For example: > > > > Reference # is a link with value 65. I want to test if this value that > > is generated randomly is on this page or not ? If the value is on this > > page then click on viewReport link for that row. Which Canoo element > > can I use for this feature. How to test the value associated to the > > link Reference #? > > > > Here is the html Code for that > > > > <td class="info-header"> > > > > <a href="#" onClick="sortby('Reference')" > > >Reference #</a> > > > > </td> > > <td class="info-header"> > > > > <div class="sortarrow"> > > > > <a href="#" onClick="sortby('Date > > Submitted')" >DateSubmitted</a> > > > > > > > > <img > > src="common/images/sortarrow.gif"/> > > > > </div> > > > > </td> > > <td class="info-value-center-rightborder"> > > > > <a > > href="viewreport.v">View Report</a> > > > > </td> > > </tr> > > > > > > <tr class="even"> > > > > <td class="info-value-rightborder"><div > > class="fixedwidth-medium">65</div></td> > > <td class="info-value-center-rightborder"> > > 04/22/2008, 12:51 AM > > </td> > > > > > > ______________________________________________________________________ > > Back to work after baby- how do you know when you're ready? > ________________________________ Express yourself wherever you are. Mobilize! <http://www.gowindowslive.com/Mobile/Landing/Messenger/Default.aspx?Locale=en-US?ocid=TAG_APRIL> ________________________________ Spell a grand slam in this game where word skill meets World Series. Get in the game. <http://club.live.com/word_slugger.aspx?icid=word_slugger_wlhm_admod_april08> ________________________________ Make i'm yours. Create a custom banner to support your cause. <http://im.live.com/Messenger/IM/Contribute/Default.aspx?source=TXT_TAGHM_MSN_Make_IM_Yours>

