title: Using jquery with casperJs test
body: <p>I have a web application which is not relying on jquery.</p>
  
  <p>I am doing functional tests thanks to (the great :) ) casperjs.</p>
  
  <p>Now I would like to use jquery in my tests. So I tried to inject it as indicated here <a href="http://casperjs.org/faq.html#faq-jquery" rel="nofollow">http://casperjs.org/faq.html#faq-jquery</a>. Well, it's not working.</p>
  
  <p>Here is my code if you can help me - is there something wrong? :</p>
  
  <pre><code>casper.start('http://localhost:8080/xxxxxx/xxxxxDialogTests.html');
  
  casper.echo("page = " + casper.page); // -&gt; it works, the page is there 
  casper.page.injectJs("../tools/jquery-1.7.2.js");
  
  casper.waitFor(function check()
  {
     return this.visible('#button_create');
  },
  function then()
  {
     this.click('#button_create');
     casper.waitFor(function check()
     {
          return this.visible('#dialog_document_name');
     },
     function then()
     {
             console.log("element : ", this.evaluate(function ()
             {
                 var el = $("input#dialog_document_name");
  
                 return el;
             }));  
     });
  });
  </code></pre>
  
  <p>I removed the test as it is not the point...</p>
  
  <p>thanks!</p>