Hi,
following sets a header, not a Cookie:
> <config>
> <header name="Cookie" value="PHPSESSID=${sessionId}"/>
> </config>
Ok, this is a Cookie header and it should be ok for the server, but this
is not a Cookie for the WebClient and therefore verifyCookie fails.
There is currently no "setCookie" step but it would be easy to program
it against HtmlUnit API.
Cheers,
Marc.
Thorsten Plappert a écrit :
Hi, I am trying to do a simple webtest (canoo webtest 2.6). The first
test does a login, and the second executes a simple search. Important is
the first, because I need the PHP session id. The second test can only
be executed successfully, if the PHP session id from the first test is
set as a cookie. I tried the following:
first test:
-----------
...
<storeCookie name="PHPSESSID" property="sessionId" propertyType="ant" />
<verifyCookie name="PHPSESSID" text="${sessionId}" />
</webtest>
second test:
------------
...
<webtest name="...">
<config>
<header name="Cookie" value="PHPSESSID=${sessionId}"/>
</config>
<invoke url="http://..." />
<verifyCookie name="PHPSESSID" text="${sessionId}" />
...
But this test failed with the message:
Message
No cookie available!
Apperently the sessionId isn't set as a Cookie (in this test) - but why?
Regards,
Thorsten
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest