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]'viewreport.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 pageFrom: [EMAIL
PROTECTED]: [EMAIL PROTECTED]; [EMAIL PROTECTED]: 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 NigamSent:
Tuesday, April 22, 2008 1:13 PMTo: davCc: [EMAIL PROTECTED]: 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 Link365 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!
_________________________________________________________________
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