Hi Sven,
which version of WebTest do you use?
You should use the latest build, release 2.1 for instance is not able to
evaluate dynamic properties outside WebTest steps (like echo) and normal
Ant properties are evaluated too early.
Otherwise I agree with Colin, that if you really need such an xpath
expression, then your code won't be really maintainable.
Furthermore I don't understand what you want to achieve from the
description "Extract href the id of this advertisement".
Marc.
Colin O'Brien wrote:
Hi Sven,
I think the problem is that because your xpath failed the property
‘adId’ did not get set so that’s probably why your </echo> message
didn’t operate as expected. Though I’m not 100% on that... Maybe someone
else on the list knows more...?
Adding an ‘id’ attribute to the </td> tag will help in solving your
current xpath issues with the cell you’re trying to reference.
Regards,
Colin.
-----Original Message-----
*From:* Sven Haiges [mailto:[EMAIL PROTECTED]
*Sent:* 06 February 2007 09:20
*To:* Colin O'Brien
*Subject:* Re: [Webtest] storeXPath Problem
HI Colin,
I am about to add an "id" element to the td tag I am trying to get, so I
hope the referencing problem will be gone, soon.
Besides this, I was putting a line like this in my code directly after
the xpath
<echo message="#{adId}"/>
It prints "#{adId}. So I have the strange feeling that I somehow
reference the saved expression in a wrong way. But that's how the
example shows it:
Just tried to change propertyType to "ant", but using ${adId} also did
not succeed.
Any ideas?
Cheers\
Sven
On 2/5/07, *Colin O'Brien *<[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi Sven,
Try putting /tbody/ between the /table/ and /tr/ tags...
Is that the shortest xpath you can use to reference the cell your
looking for...? If you can find a shorter xpath then it'll be easier to
use... Can you send a snippet of the HTML you're working on and maybe
someone on the list will be able to suggest a better xpath to use...
Cheers,
Colin.
-----Original Message-----
*From:* [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> [mailto:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>]
*On Behalf Of *Sven Haiges
*Sent:* 05 February 2007 16:01
*To:* Webtest Mailing List
*Subject:* [Webtest] storeXPath Problem
HI all,
I am running into a storeXPatch problem:
<storeXPath description="Extract href the id of this advertisement"
xpath="string(//table[3]/tr[2]/td[1]/table[1]/tr[1]/td[2])"
property="adId" />
I verified the xpath expression with the xpath explorer. But later in
the test, I cannot reference #{adId}
Any ideas? from the archives, it seems there are known issues for this.
Is there a workaround? Using 2.1 on Win
Cheers,
Sven
--
Sven Haiges
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss
--
Sven Haiges
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest