title: CasperJS : read web page from page that loads after for submission
body: <p>My objective is to read data from posted page ( page that loads after form submission ) using casperJS.</p>
  
  <p>Explanation :
  I have script in casperJS that reads a webpage <a href="http://www.example.com/details" rel="nofollow noreferrer">http://www.example.com/details</a> and logs in console.
  I dont have problem reading from this initial page.
  Now there is a href link which upon clicking it submits form to the same url ( form action self ) <a href="http://www.example.com/details" rel="nofollow noreferrer">http://www.example.com/details</a> and updates newly fetched data in one of dom element.</p>
  
  <p>I want to read the newly fetched data after the page loads after form submission.</p>
  
  <p>Here is the part of the script that does this process.</p>
  
  <pre><code>casper.start('http://www.example.com/details', function () {
  this.page.injectJs('/path../to../jquery.min.js');
  casper.evaluate(function () {
      var all_data = $('.selector').text();
      console.log(JSON.stringify(all_data));
  });
  
  // submitting hidden form by clicking href
  $('.formSubmit').click();
  casper.then(function(){
      casper.wait(5000, function(){
          casper.evaluate(function () {
              var new_data = $('.selector').text();
              console.log(JSON.stringify(new_data));
              });
          });
      });
  });
  </code></pre>