Hi,

htmlunit doesn't currently set any referer field. There is already a feature request for this:
http://sourceforge.net/tracker/index.php?func=detail&aid=1245481&group_id=47038&atid=448269

I guess that you know that relying on such information is not a very good option. Browsers don't have to send referer information (it is possible to deactivate it in some browsers AFAIK).

Workaround:
If you need it only on one place, you could use a small Groovy script to set a general request header (see http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/WebClient.html#addRequestHeader(java.lang.String,%20java.lang.String))
before clicking your link/button and remove this header after this step.

Marc.

bat wrote:
i think i was mistaken.
obviously, the problem is not cookie-related at all.
the page to be tested is trying to build a string using urlreferrer, which
appears to be null using webtest (in fact, the page is called by a
buttonclick, so a referrer should exist).
is it standard webtest behaviour not to send referrer information?
if so, would there be workaround?

thank you very much for your assistance


Hi,

normally cookies are handled transparently, just like in real browsers. Why do you want to set the cookie by yourself?

Marc.

PS: your application specific error messages don't help ;-(

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to