title: Getting all table rows and returning them using an XPath query in CasperJS
body: <p>I'm using Casper.js to automate a regular upload. I've managed to upload the file and check if it's valid, but I'd like to parse the table which is returned if there's errors, but I get the error <code>[error] [remote] findAll(): invalid selector provided "[object Object]":Error: SYNTAX_ERR: DOM Exception 12</code>. Here's the relevant part of my code:</p>
  
  <pre><code>casper.then(function() {
      if (this.fetchText('.statusMessageContainer').match(/Sorry, the file did not pass validation. Please review the validation errors in the report below/)) {
          this.echo("Upload failed!", "ERROR");
          errors = this.evaluate(function() {
              var errorRows = __utils__.findAll({
                  type: 'xpath',
                  path: '//table[@id="uploadTable"]/tr[position()&gt;1]'
              });
              return Array.prototype.forEach.call(errorRows, function(e) {
                  return e;
              });
          });
          this.echo(JSON.stringify(errors));
      } else {
          this.echo("Upload successful", "INFO");
      }
  });
  </code></pre>
  
  <p>Any ideas?</p>