title: Click() function isn't working in protractor scripts
body: <p>I'm trying to automate my tests with Protractor and Appium for an AngularJS site with jasmine framework in iPad simulator, <code>sendkeys()</code> function is working for username and password, but when i click into the login button the test is passed, but the action isn't done : no redirection to home page, and no on click effect is displayed for login button, i'm sure that element is located correctly ! because when i expect the gettext() to be equal to&quot;LOGIN&quot; it is passed but no redirection even if i put <code>browser.sleep(8000);</code>
  Here my test script :</p>
  <pre><code>    &quot;use strict&quot;;
      require(&quot;jasmine-expect&quot;);
      var wd = require(&quot;wd&quot;);
      describe('my app', function() {
      it('should make the login test',function() {
     
  //    browser.ignoresynchronization=true;
      browser.get(&quot;http://10.0.22.82:8080/jws/fetablet&quot;);
      expect(browser.getCurrentUrl()).toEqual((&quot;http://10.0.22.82:8080/jws/fetablet/#/login&quot;));
  
      element(by.model('credentials.username')).sendKeys('RET02').then(function(){
      element(by.model('credentials.password')).sendKeys('RET02').then(function(){
      element(by.css('.login-button')).click().then(function(){
      browser.sleep(8000); expect(browser.getCurrentUrl()).not.toEqual(&quot;http://10.0.22.82:8080/jws/fetablet/#/login&quot;);
      });
      });
      });
  });
  });
  </code></pre>
  <p>Is there another method to locate the click button correctly?
  Here my html code :</p>
  <pre><code>​​&lt;div class=&quot;lo​​gin_lang&quot;&gt; &lt;md-button class=&quot;lang_button&quot; ng-click=&quot;changeLang()&quot;&gt;{{lang}}&lt;/md-button&gt; &lt;/div&gt; 
  &lt;div layout=&quot;column&quot; flex layout-align=&quot;center center&quot; class=&quot;md-padding splash-background&quot;&gt; &lt;div class=&quot;login-logo&quot;&gt; &lt;img src=&quot;{{logoSrc}}&quot;&gt; &lt;/div&gt; &lt;form class=&quot;login-form&quot; name=&quot;loginForm&quot; ng-submit=&quot;login()&quot;&gt; 
  &lt;fieldset&gt; &lt;md-input-container class=&quot;md-block&quot;&gt; 
  &lt;label translate=&quot;login.USERNAME&quot; ng-class=&quot;{'floating-label-rtl':dir==='rtl'}&quot; 
  
  class=&quot;login-label&quot;&gt;Username&lt;/label&gt; 
  &lt;input required ng-model=&quot;credentials.username&quot; ng-focus=&quot;onFocus()&quot; type=&quot;text&quot;&gt; 
  
  &lt;div ng-messages=&quot;loginForm.credentials.username.$error&quot; ng-show=&quot;loginForm.credentials.username.$dirty&quot;&gt; 
  &lt;div ng-message=&quot;required&quot; trans
  ​​late=&quot;login.MESSAGE_REQUIRED&quot;&gt;This is required.&lt;/div&gt; &lt;/div&gt; &lt;/md-input-container&gt; &lt;md-input-container class=&quot;md-block&quot;&gt; &lt;label ​​translate=&quot;login.PASSWORD&quot; ng-class=&quot;{'floating-label-rtl':dir==='rtl'}&quot; 
  
  
  class=&quot;login-label&quot;&gt;Password&lt;/label&gt; &lt;input required ng-model=&quot;credentials.password&quot; ng-focus=&quot;onFocus()&quot; type=&quot;pa
  ​​ssword&quot;&gt; 
  &lt;div ng-messages=&quot;loginForm.credentials.password.$error&quot; ng-show=&quot;loginForm.credentials.password.$dirty&quot;&gt; &lt;div ng-message=&quot;required&quot; translate=&quot;login.MESSAGE_REQUIRED&quot;&gt;This is required.&lt;/div&gt; &lt;/div&gt; &lt;/md-input-container&gt; 
  
  &lt;div layout-align=&quot;center center&quot; layout=&quot;column&quot; ng-if=&quot;oneTimePassword&quot;&gt; &lt;p class=&quot;login-otp-message&quot; translate=&quot;login.OTP_MESSAGE&quot;&gt;Enter the code which you received by SMS&lt;/p&gt; &lt;md-button class=&quot;md-warn login-otp-retry&quot; translate=&quot;login.OTP_RETRY&quot; ng-click=&quot;retry()&quot;&gt;Retry&lt;/md-button&gt; &lt;/div&gt; &lt;md-input-container class=&quot;md-block&quot; ng-if=&quot;oneTimePassword&quot;&gt; &lt;label translate=&quot;login.SECURITY_CODE&quot; class=&quot;login-label&quot;&gt;Security code&lt;/label&gt; &lt;input required ng-model=&quot;credentials.securityCode&quot; ng-focus=&quot;onFocus()&quot; type=&quot;password&quot;&gt; &lt;div ng-messages=&quot;loginForm.credentials.securityCode.$error&quot; ng-show=&quot;loginForm.credentials.securityCode.$dirty&quot;&gt; &lt;div ng-message=&quot;required&quot; translate=&quot;login.MESSAGE_REQUIRED&quot;&gt;This is required.&lt;/div&gt; &lt;/div&gt; &lt;/md-input-container&gt; &lt;div layout-align=&quot;center&quot;&gt; &lt;section layout-align=&quot;center&quot; layout=&quot;row&quot; layout-sm=&quot;column&quot;&gt; &lt;div id=&quot;login-error&quot; md-caption class=&quot;msg-error&quot; ng-show=&quot;error&quot; class=&quot;label&quot;&gt;{{error}}&lt;/div&gt;
  ​​
  
   &lt;md-button type=&quot;submit&quot; class=&quot;md-raised login-button&quot; ng-disabled=&quot;clicked&quot; translate=&quot;login.LOGIN&quot;&gt;Login&lt;/md-button&gt; &lt;/section&gt;
  ​​
   &lt;/div&gt; &lt;/fieldset&gt; &lt;/form&gt; &lt;md-divider&gt;&lt;/md-divider&gt; &lt;footer class=&quot;login-footer&quot;&gt; &lt;div layout=&quot;row&quot; layout-align=&quot;center center&quot;&gt; &lt;md-button ng-click=&quot;goToCustomerCare()&quot; class=&quot;login-footer-link&quot; translate=&quot;login.CUSTOMER_CARE&quot;&gt;Contact Customer Care&lt;/md-button&gt; &lt;div&gt; | &lt;/div&gt; &lt;md-button ng-click=&quot;showDisclaimer()&quot; class=&quot;login-footer-link&quot; translate=&quot;login.DISCLAIMER&quot;&gt;Disclaimer&lt;/md-button&gt; &lt;/div&gt; &lt;/footer&gt; &lt;/div&gt;
  </code></pre>
  <p>​​I put the details of Appium recorder about the login button</p>
  <p><a href="https://i.stack.imgur.com/we05o.png" rel="noreferrer"><img src="https://i.stack.imgur.com/we05o.png" alt="Appium Inspector" /></a></p>