2 messages in com.canoo.lists.webtestRe: [Webtest] RE: WebTest digest, Vol...| From | Sent On | Attachments |
|---|---|---|
| Francisco Javier Martin Gutierrez | 13 Apr 2007 05:42 | |
| Marc Guillemot | 13 Apr 2007 05:58 |
| Subject: | Re: [Webtest] RE: WebTest digest, Vol 1 #1807 - 3 msgs![]() |
|---|---|
| From: | Marc Guillemot (mgui...@yahoo.fr) |
| Date: | 04/13/2007 05:58:07 AM |
| List: | com.canoo.lists.webtest |
Hi,
comments below Francisco Javier Martin Gutierrez wrote:
Please, i have some questions.
First, I have this code in my page but I can't follow it:
<a href="HistoriaSocialParrillaFamiliar.do?codHS=0006008"><img src="imagenes/ico_familia.gif" alt="Parrilla Socio-familiar" border="0" onclick="cierre=false;"></a>
href change each time i goto the page. I have tried to save href xpath link but I have errors. I try:
<storeXPath description="Extract href attribute from...?????" xpath="//a [1]/@href" property="link" /> or:
<storeXPath description="Extract href attribute from ...?????" xpath="//a[@src= imagenes/ico_familia.gif]/@href"
property="link" /> and:
<clickLink description="Click Link: Parrilla Socio-Familiar" href="#{link}" />
but any of them work ok.
what about <clickLink label="Parrilla Socio-familiar"/> or <clickLink xpath="//a[img/@alt = 'Parrilla Socio-familiar']"/>
Second, I need to set Referer option to http 1.1 response, but I always obtain a message like this:
[storeHeader] INFO (com.canoo.webtest.steps.Step) - Message was: Header "Referer:" not set!
...
storeHeader allows you to read an existing header and to put it into a property, not to set an header.
htmlunit 1.11 doesn't set automatically the Referer header but this feature has been implemented since the release. You can get latest sources from htmlunit's SVN.
Marc.
NB: it's sometimes questionable for a webapp to rely on the Referer header




