Hi Hitesh,

I'm sure you find out already, one of the functions of <cancat> is to output a 
file that contains value of properties you intend to store and use for other 
tests.
For more examples http://ant.apache.org/manual/CoreTasks/concat.html

Don't really know why <verifyText> doesn't work for your page. Did you separate 
the <storeXPath> and <verifyText> Steps in two different webtests?
If so, could you check what the property file looks like after running 
<storeXPath> webtest?
It should be something like this:
Servicename2= ... (... is the text value you are going to verify in the 
verifyText step)

Then you run the <verifyText> webtest and see if that works. Hope I make more 
sense this time.

Lily


________________________________
From: Hitesh Gupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2008 12:12 AM
To: Meng, Lily
Subject: Re: [Webtest] Problem while working with storeXpath element

Hi,

I tried the way you said for example:-

<storeXPath xpath="/html/body/b" property="Servicename2"/>
<concat destfile="../verifyText.properties" description="output property value 
for verify test">Servicename2=#{Servicename2}</concat>

<clickLink xpath="/html/body/a[2]"/>
<property file="../verifyText.properties"/>
<verifyText description="Verify that text is contained in the page" 
text="${Servicename2}"/>

then again I got the same error "Text not found in page". Though the text is 
present on the page.

I dont know why this error is coming I can see that ${Servicename2} is 
containing the right text to verify.

Thanks,
Hitesh
On Tue, Oct 14, 2008 at 9:02 PM, Meng, Lily <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]>> wrote:

I forget that in the verifyStepFile include:

<property file="../verifyText.properties"/>



________________________________

From: Meng, Lily
Sent: Tuesday, October 14, 2008 10:18 AM
To: 'Hitesh Gupta'
Subject: RE: [Webtest] Problem while working with storeXpath element



Hi Hitesh,



By Xpather, I mean other Xpath, sorry about the confusion.





You can try to output the stored property to a property file.

Then in the verifyText step, call the stored property value.

This probably makes it more complicated, but worth a try :)

So something similar to this:



In the storeStepFile:

<storeXPath xpath="/html/body/b" property="Servicename2" />

<concat destfile="../verifyText.properties" description="output property value 
for verify test">Servicename2=#{Servicename2}</concat>



In the property file verifyText.properties:

Servicename2= .... (this is generated when you run the storeStepFile test)



In the verifyStepFile:

<verifyText description="Verify that text is contained in the page" 
text="${Servicename2}"/>









________________________________

From: Hitesh Gupta [mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>]
Sent: Monday, October 13, 2008 10:15 PM
To: Meng, Lily
Subject: Re: [Webtest] Problem while working with storeXpath element



Hi Lily,

Thanks for the reply...

Xpath is correct and I am sure of this as when I echo this property 
${Servicename2} I got the right text but when I am verifyText using this 
property then it says that Text not found.

I do not know Xpather, please tell me what is this and how to use this..?

Hitesh

On Mon, Oct 13, 2008 at 8:24 PM, Meng, Lily <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]>> wrote:

Hi Hitesh,



My guess is that the Xpath isn't correct.

Have you tried other Xpather?



Lily





________________________________

From: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> [mailto:[EMAIL 
PROTECTED]<mailto:[EMAIL PROTECTED]>] On Behalf Of Hitesh Gupta
Sent: Monday, October 13, 2008 3:55 AM
To: [email protected]<mailto:[email protected]>
Subject: [Webtest] Problem while working with storeXpath element



Hi,

I am using storeXpath to store the text present in my web page

<storeXPath xpath="/html/body/b" property="Servicename2" />

after storing the x path I am verifying that text but the issue is when I am 
verifying the text by
<verifyText description="Verify that text is contained in the page" 
text="#{Servicename2}"/>
 my test fails and it says that Text not found in the page.

It correctly stores the name of the text in the property but verifyText step 
fails.

Please suggest me something.

Hitesh



Reply via email to