{"action":"created","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/13115","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/13115/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/13115/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/13115/events","html_url":"https://github.com/ariya/phantomjs/issues/13115","id":64875098,"number":13115,"title":"Arg '--cookies-file' broken on 2.0","user":{"login":"jcchristian","id":4141392,"avatar_url":"https://avatars.githubusercontent.com/u/4141392?v=3","gravatar_id":"","url":"https://api.github.com/users/jcchristian","html_url":"https://github.com/jcchristian","followers_url":"https://api.github.com/users/jcchristian/followers","following_url":"https://api.github.com/users/jcchristian/following{/other_user}","gists_url":"https://api.github.com/users/jcchristian/gists{/gist_id}","starred_url":"https://api.github.com/users/jcchristian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcchristian/subscriptions","organizations_url":"https://api.github.com/users/jcchristian/orgs","repos_url":"https://api.github.com/users/jcchristian/repos","events_url":"https://api.github.com/users/jcchristian/events{/privacy}","received_events_url":"https://api.github.com/users/jcchristian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-28T00:00:34Z","updated_at":"2015-03-30T06:35:48Z","closed_at":null,"body":"I was trying this simple code using 2.0:\r\n\r\n    from selenium.webdriver.phantomjs import webdriver\r\n\r\n    driver = webdriver.WebDriver(service_args=['--cookies-file=cookies.txt'])\r\n    driver.get('http://google.com')\r\n    driver.quit()\r\n\r\nThe 'cookies.txt' file wasn't being created, tried many times, no lucky. Downgraded to 1.9.8 and bang, working 100%"},"comment":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/comments/87570266","html_url":"https://github.com/ariya/phantomjs/issues/13115#issuecomment-87570266","issue_url":"https://api.github.com/repos/ariya/phantomjs/issues/13115","id":87570266,"user":{"login":"yali25","id":11714720,"avatar_url":"https://avatars.githubusercontent.com/u/11714720?v=3","gravatar_id":"","url":"https://api.github.com/users/yali25","html_url":"https://github.com/yali25","followers_url":"https://api.github.com/users/yali25/followers","following_url":"https://api.github.com/users/yali25/following{/other_user}","gists_url":"https://api.github.com/users/yali25/gists{/gist_id}","starred_url":"https://api.github.com/users/yali25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yali25/subscriptions","organizations_url":"https://api.github.com/users/yali25/orgs","repos_url":"https://api.github.com/users/yali25/repos","events_url":"https://api.github.com/users/yali25/events{/privacy}","received_events_url":"https://api.github.com/users/yali25/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T06:35:48Z","updated_at":"2015-03-30T06:35:48Z","body":"Hi,\r\n\r\nI encountered the same issue. By changing one line in the \"phantom.cpp\" file I got it working, but I'm not sure if this is the correct way to do it (or if it will break existing code).\r\n\r\nChange the the line in the Phantom::createCookieJar method from:  \r\n**return new CookieJar(filePath, this);**\r\n\r\nto \r\n\r\n**return new CookieJar(m_config.cookiesFile() != \"\" ? m_config.cookiesFile() : filePath,this);**\r\n"}}