title: What is the best effective way to collect data from a table using protractor?
body: <p>What is the best effective way to collect data from a table using protractor.</p>
  
  <p>I collecting the data shown in the code below and it is taking 20-30 seconds for 10 rows.</p>
  
  <p>The buildStr counter is for creating a object for every row, 8 is the number of columns.</p>
  
  <pre><code>    row = {};
      gridRows = [];
  
      element.all(by.css('#contenttableGrid div[role="gridcell"] div')).each(function(element){
          element.getText().then(function(text){
              row[headerName[buildStr]] = text;
              buildStr++;
  
              if(buildStr === 8){
                   buildStr = 0;
                   gridRows[rowCounter] = row;
                   rowCounter++;
                   row = {};
              }
          });
      });
  </code></pre>