title: CasperJS - Screenshots of table rows
body: <p>I'm starting with CasperJS, and I'm interested in the « capture » function. For « exercises », I want to capture each row of a table like this :</p>
  
  <pre><code>&lt;table id="idTable"&gt;
      &lt;thead&gt;
          &lt;tr id="theader"&gt;
              &lt;td&gt;1&lt;/td&gt;
              &lt;td&gt;2&lt;/td&gt;
              &lt;td&gt;3&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr class="" rel="xx"&gt;
              &lt;td&gt;Content1&lt;/td&gt;  
              &lt;td&gt;Content2&lt;/td&gt;  
              &lt;td&gt;Content3&lt;/td&gt;  
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>So far, I'm here :</p>
  
  <pre><code>var casper = require('casper').create({
      clientScripts: ["jquery.min.js"]
  });
  
  function createScreenshots() {
      var i = 0;
      $('#idTable &gt; tbody  &gt; tr').each(function() {       
          this.captureSelector('myscreens/'+i+'.png', $(this).selector);
          i++;
      });
  }
  casper.start('mywebsite.com',function(){
      this.evaluate(createScreenshots);
  });
  casper.run();
  </code></pre>
  
  <p>But nothing works (no error, but no screenshots in the « myscreens » folder). If someone could show me the way ?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Kai23</p>