title: casperjs evaluate function not working
body: <p>I am working on casperjs. I write following program to get output:</p>
  
  <pre><code>var casper = require('casper').create();
  var cookie;
  casper.start('http://wordpress.org/');
  casper.then(function() {
         this.evaluate(function() {
              cookie=document.cookie;
         })
     })
  
  casper.then(function() {
  console.log("Page cookie");
  console.log(cookie);
  })
  casper.run(function() {
   this.echo('Done.').exit();
  })
  </code></pre>
  
  <p>Output for above is:<br/>
    Page cookie<br/>
   undefined<br/>
   Done.</p>
  
  <p>why it give me undefined? Help me into this.</p>