[wtr-general] Re: How to save a cookie and reload it?

2008-11-12 Thread jnxgn
It is really a shame I cannot understant the cookie setting, maybe I need more time. But I know the gem of Mechanize can deal with the cookie quite well, such as the code: agent.cookie_jar.save_as('cookie.txt',:cookiestxt) -- agent.cookie_jar.load('cookie.txt',:cookiestxt) Is there a way to

[wtr-general] Re: How to save a cookie and reload it?

2008-11-11 Thread jnxgn
I tried following code, could anyone tell what is wrong? It would be highly appreciated: ie77= Watir::IE.new ie77.goto(http://*;) sleep 3 tmpcookie = ie77.document.cookie puts this is tmpcookie puts tmpcookie # cookie is displayed Watir::IE.close_all sleep 3 ie77= Watir::IE.new

[wtr-general] Re: How to save a cookie and reload it?

2008-11-11 Thread Tony
Like Alex had said, its not that simple to add a cookie and get the cookie details by using ie77.document.cookie = tmpcookie. A cookie is set by the server and has 3 main identifiers - (name, domain, path) if any of these 3 identifiers are different, a new cookie is created. There are a few

[wtr-general] Re: How to save a cookie and reload it?

2008-11-09 Thread jnxgn
Alex, Thank you so much, I will try it. On 11月9日, 下午4时56分, alex.ikhelis [EMAIL PROTECTED] wrote: Try to output cookies values and you will see how your browser's document keeps it: puts ie.document.cookie or puts tmpcookie it should be a string with cookie_name=cookie_value pairs

[wtr-general] Re: How to save a cookie and reload it?

2008-11-09 Thread alex.ikhelis
Try to output cookies values and you will see how your browser's document keeps it: puts ie.document.cookie or puts tmpcookie it should be a string with cookie_name=cookie_value pairs separated with semicolon. E.g. SERVER=213 means that there is 1 cookie named SERVER set to value of 213 in your

[wtr-general] Re: How to save a cookie and reload it?

2008-11-08 Thread jnxgn
Thanks a lot, acturelly I searched and read all the posts related to cookies in this group, but could not find some hints. what I need is to autopost in a forum by different users, I tried but failed the codes below: login with user_name_1 tmpcookie = ie.document.cookie posting with user_name_1