title: CasperJS click google search button, this.evaluate() javascript
body: <p>I am now learning Casperjs, I want to mimic the google search( 1. fill in the content 2. click the button; not use 'fill'). The javascript code works in my Chrome console, but doesn't work in my CasperJS. Any ideas, complaints or same experience as me ? </p>
  
  <p>Waiting for answers!</p>
  
  <pre><code>var casper = require("casper").create({
      logLevel:"info",
      verbose:true,
  });
  
  casper.start("https://www.google.fr/",function(){
      this.evaluate(function(){
          document.getElementById("gbqfq").value="phantomjs";
          document.getElementById("gbqfsa").click();
      });
      //this.fill('form[action="/search"]',{q:'phantomjs'},true);
  }).then(function(){
      this.echo(this.getTitle());
  });
  
  casper.run();
  </code></pre>