OK, i definitely do have a problem with xpath and storing dynamic
properties:
<storeXPath description="Extract title"
xpath="/html/head/title" property="title" />
<echo message="#{title}"/>
This is a super easy xpath epxression that should really give me the title.
I also tried string(/html/head/title), but it always prints plain #{title}
Could I somehow configure sth wrong to make webtest not store my properties?
Or is there a bug in this xpath expression?
This is my config that is reused as an xml entity...
<config
host="some host"
port="some port"
protocol="http"
basepath="some basepath"
summary="true"
saveresponse="true"
resultpath="../../webtest-report"
/>
Who is using the storeXpath successfully? Are there some known gotchas
regarding differences in xpath epxressions between Xpath explorer and the
xpath engine in webtest?
Cheers\
Sven
On 2/6/07, Colin O'Brien <[EMAIL PROTECTED]> 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]> 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]
*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]
Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss
--
Sven Haiges
[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]
Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss