title: Protractor e2e testing for sorting
body: <p>I am writing e2e test cases using protractor. I am trying to write tests for sorting (ascending, descending). This is my html code</p>
  
  <pre><code>&lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;
           &lt;a ng-click="sortBy('Name')" href="" style="text-decoration: none;" class=""&gt; Name&lt;/a&gt;
          &lt;/td&gt;
          &lt;td&gt;
           &lt;a ng-click="sortBy('RollNo')" href="" style="text-decoration: none;"&gt; Roll Number&lt;/a&gt;
          &lt;/td&gt;
          &lt;td&gt;
           &lt;a ng-click="sortBy('subject')" href="" style="text-decoration: none;"&gt; Subject&lt;/a&gt;
          &lt;/td&gt;     
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ANDREW, STRAUSS&lt;/td&gt;
          &lt;td&gt;122&lt;/td&gt;
          &lt;td&gt;Maths&lt;/td&gt;
      &lt;/tr&gt;  
      &lt;tr&gt;
          &lt;td&gt;ANDREW, STRAUSS&lt;/td&gt;
          &lt;td&gt;123&lt;/td&gt;
          &lt;td&gt;Science&lt;/td&gt;
      &lt;/tr&gt;      
  &lt;/tbody&gt;
  </code></pre>
  
  <p>Can we test sorting. If yes, how?</p>