{"issue":{"title":"Cookies issue","user":{"login":"demian85","id":470630,"url":"https://api.github.com/users/demian85","avatar_url":"https://secure.gravatar.com/avatar/f29ce246704ed07c7a6453acb35daff6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f29ce246704ed07c7a6453acb35daff6"},"created_at":"2011-12-26T15:48:19Z","milestone":null,"labels":[],"state":"open","updated_at":"2011-12-26T20:00:58Z","id":2658733,"closed_at":null,"html_url":"https://github.com/assaf/zombie/issues/241","pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"I'm just trying to login into a site but zombie fails to save the returned cookies or whatever.\r\n\r\nWhen I press the login button and the callback is called I can see the 'set-cookie' header being sent correctly by dumping browser.lastResponse. But right after that I call browser.dump() and browser.cookies() but neither of them shows me the new cookies.\r\nAlso tried calling browser.reload() with no luck.\r\n\r\nAm I missing something? the code is very simple, do you really need an example?","number":241,"url":"https://api.github.com/repos/assaf/zombie/issues/241","comments":2,"assignee":null},"comment":{"user":{"login":"demian85","id":470630,"url":"https://api.github.com/users/demian85","avatar_url":"https://secure.gravatar.com/avatar/f29ce246704ed07c7a6453acb35daff6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f29ce246704ed07c7a6453acb35daff6"},"created_at":"2011-12-26T20:00:58Z","updated_at":"2011-12-26T20:00:58Z","id":3276559,"body":"Twitter login example, the cookies' domain is \".twitter.com\" and zombie does not save them.\r\n\r\n\tvar Browser = require('zombie'),\r\n\t\tutil = require('util');\r\n\t\t\r\n\tvar userData = {\r\n\t    username:\"test\",\r\n\t    password:\"xxxxx\"\r\n\t};\r\n\t\r\n\tvar browser = new Browser({\r\n\t\tdebug : true,\r\n\t\trunScripts : true,\r\n\t\twaitFor : 5000,\r\n\t\tuserAgent : 'Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0) Gecko/20100101 Firefox/9.0'\r\n\t});\r\n\t\r\n\tbrowser.visit('https://twitter.com/', function() {\r\n\t\tbrowser.dump();\r\n\t\tconsole.log(util.inspect(browser.lastResponse.headers));\r\n\t\tconsole.log(browser.cookies().all())\r\n\t\t\r\n\t\tbrowser.fill(\"session[username_or_email]\", userData.username);\r\n\t\tbrowser.fill(\"session[password]\", userData.password);\r\n\t\t\r\n\t\tbrowser.pressButton('.submit', function() {\r\n\t\t\tbrowser.dump();\r\n\t\t\t\r\n\t\t\tconsole.log(browser.cookies().all())\r\n\t\t});\r\n\t});","url":"https://api.github.com/repos/assaf/zombie/issues/comments/3276559"},"action":"created"}