title: to test Angularjs Alerts with protractor
body: <p>i am new to protractor, i want to test alerts 
  this is my controller:</p>
  
  <pre><code>testapp.controller('SampleCtl', ['$scope', function($scope) {
      $scope.age = 10;
  
      $scope.sub = function(a, b) {
          if(a&gt;b){
              return a - b;
          }
          else{
              alert("please enter as first number is graterthan second number ");
          }
      };
  }]);
  </code></pre>
  
  <p>this is my html code:</p>
  
  <pre><code>    &lt;form onsubmit=""sub(a,b)&gt;
             &lt;input type="number" name="a" id="a"&gt;
             &lt;input type="number" name="b" id="b"&gt;
             &lt;input type=""submit&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>if we enter 8,7 success.
  if we enter 7,8 failure end gives an alert.
  how can we end to end test that alert with protractor.
  any one please help me. thanks in advance.</p>