10 messages in com.canoo.lists.webtestRe: [Webtest] storeXPath Problem| From | Sent On | Attachments |
|---|---|---|
| Sven Haiges | 05 Feb 2007 08:01 | |
| Colin O'Brien | 05 Feb 2007 08:48 | |
| Colin O'Brien | 06 Feb 2007 01:43 | |
| Sven Haiges | 06 Feb 2007 02:04 | |
| Marc Guillemot | 06 Feb 2007 02:08 | |
| Sven Haiges | 06 Feb 2007 02:18 | |
| Colin O'Brien | 06 Feb 2007 02:21 | |
| Sven Haiges | 06 Feb 2007 02:27 | |
| Marc Guillemot | 06 Feb 2007 02:43 | |
| Sven Haiges | 06 Feb 2007 02:58 |
| Subject: | Re: [Webtest] storeXPath Problem![]() |
|---|---|
| From: | Marc Guillemot (mgui...@yahoo.fr) |
| Date: | 02/06/2007 02:08:01 AM |
| List: | com.canoo.lists.webtest |
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:sven...@googlemail.com] *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 *<coli...@capetechnologies.com <mailto:coli...@capetechnologies.com>> 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:* webt...@lists.canoo.com <mailto:webt...@lists.canoo.com> [mailto: webt...@lists.canoo.com <mailto:webt...@lists.canoo.com>] *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 sven...@googlemail.com <mailto:sven...@googlemail.com>
Skype: hansamann Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast: http://hansamann.podspot.de/rss
-- Sven Haiges sven...@googlemail.com <mailto:sven...@googlemail.com>
Skype: hansamann Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast: http://hansamann.podspot.de/rss




