title: How to get hrefs from from elements with a certain class through CasperJS?
body: <p>I've got a web page with information in this format:</p>
  
  <pre><code>&lt;p&gt;
      &lt;a class="class1" href="href1"&gt;text1&lt;/a&gt;
      text2
  &lt;/p&gt;
  
  &lt;p&gt;
      &lt;a class="class1" href="href2"&gt;text1a&lt;/a&gt;
      text2a
  &lt;/p&gt;
  </code></pre>
  
  <p>Using CasperJS, I need to get an array of all the information contained in just in elements with <em>class1</em> in this format:</p>
  
  <pre><code>href1
  text1
  text2
  
  href2
  text1a
  text2a
  </code></pre>
  
  <p>I've tried using this code:</p>
  
  <pre><code>var casper = require('casper').create();
  casper.start('url', function() {
      require('utils').dump(this.getElementsAttribute('div[class="class1"]', 
            'class'));
  });
  casper.run();
  </code></pre>
  
  <p>However, I just got a '[ ]' as an answer.</p>
  
  <p>Can anybody help me find the error in my code?</p>