答复: [Httpunit-develop] Cookie cound no t be set
"chensong" <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for response.
There is a strange circumstance.
I do begin at https://www.joyo.com/user/login.asp [HTTPS]
When entering this page via httpunit, I can see a cookie 'date' and 'uid'
set, and also this can be read out.
wc.getResponse("https://www.joyo.com/user/login.asp")
String[] cookies = wc.getCookieNames();
.....
Then I do a login/submit on this page, According to the program ,a new
cookie should be set, 'username'
At this time using wc.getCookieNames(); also ce read this out.
The problem is :
The next page I want to test is http://www.joyo.com/cart/cart.asp. [HTTP]
It will read the cookie 'username' and display on the page.
In IE it is all OK, but via httpunit, the value can not be visited! Although
using wc.getCookieNames()I can see the cookie and its value.
Then I tried this code
wc.putCookie("username", "c_song");
After this, I can using httpunit to visit
http://www.joyo.com/cart/cart.asp. It is OK now!
Why?
This time when seeing wc.getCookieNames();, it shows 2 cookie named
'username'!
So strange....
Any suggestion?
thanks
-----邮件原件-----
发件人: [email protected]
[mailto:[email protected]] 代表 Graeme J
Sweeney
发送时间: 2006年8月10日 21:00
收件人: Discussion of use and development of HttpUnit
主题: Re: [Httpunit-develop] Cookie cound not be set
On Thu, 10 Aug 2006, chensong wrote:
> And also, I use such code, founds cookie values are ok, but why, the
> file not created?
Consider it held in memory for the duration of your test rather than stored
as a file.
All you need to do is test that the cookie exists (and matches the expected
value).
--
Graeme -
Outlook Express user? - http://home.in.tum.de/~jain/software/oe-quotefix/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop