10 messages in com.canoo.lists.webtestRE: [Webtest] Testing random values o...
FromSent OnAttachments
Deepa Nigam22 Apr 2008 10:46 
dav22 Apr 2008 11:08 
Deepa Nigam22 Apr 2008 11:12 
dav22 Apr 2008 11:15 
Forsberg, Mike22 Apr 2008 11:15 
Deepa Nigam22 Apr 2008 14:50 
George Policello22 Apr 2008 15:46 
Deepa Nigam22 Apr 2008 22:10 
Forsberg, Mike23 Apr 2008 07:00 
Deepa Nigam23 Apr 2008 11:30 
Subject:RE: [Webtest] Testing random values on the page
From:Deepa Nigam (deep@hotmail.com)
Date:04/22/2008 10:10:37 PM
List:com.canoo.lists.webtest

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 pageFrom:
gpolicello@mmetrics.comTo: webt@lists.canoo.com; deepani@hotmail.comDate:
Tue, 22 Apr 2008 15:46:51 -0700

The problem is probably the single quotes around the 31 in <//tr/td[ '31' ]/td/a[@href='viewreport.v']>"

Try to remove them from xpath="//tr/td['#myRandomNumber']"/> and from xpath="//tr/td['#{myRandomNumber}']/td/a[@href='viewreport.v']" George

From: webt@lists.canoo.com [mailto:webt@lists.canoo.com] On
Behalf Of Deepa NigamSent: Tuesday, April 22, 2008 2:51 PMTo:
webtest@lists.canoo.comSubject: 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/a[@href='viewreport.v']>" The snippet from the
target:<verifyXPath xpath="//tr/td['#myRandomNumber']"/>
<storeXPath description="Click View Report Link"
xpath="//tr/td['#{myRandomNumber}']/td/a[@href='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> &nbsp; <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&nbsp;Report</a></td> </tr>

Subject: RE: [Webtest] Testing random values on the pageFrom:
mike.forsberg@amd.comTo: webt@gate4.canoo.com; deepani@hotmail.comDate: 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: webt@gate4.canoo.com [mailto:webt@gate4.canoo.com] On
Behalf Of Deepa NigamSent: Tuesday, April 22, 2008 1:13 PMTo: davCc:
webtest@gate4.canoo.comSubject: 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: da@nnx.com> To:
deep@hotmail.com> CC: webt@lists.canoo.com> 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>> > > > &nbsp;> > > >
<img> > src="common/images/sortarrow.gif"/>> > > > </div>> > > > </td>> > <td
class="info-value-center-rightborder">> > > > <a> >
href="viewreport.v">View&nbsp;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.