title: Protractor - fields present but not visible - Element is not currently interactable and may not be manipulated
body: <p>I've only just started with Protractor.</p>
  
  <p>This is my problem:</p>
  
  <p>I want to log in to a website. When the page loads, it displays a spinning loading wheel before displaying the Username and Password fields, and a Sign in button.
  My problem is that any attempts to <code>clear()</code> or <code>sendKeys()</code> fail because the fields are not yet visible on the screen, and protractor is trying to interact with them.</p>
  
  <blockquote>
    <p>InvalidElementStateError: invalid element state: Element is not
    currently interactable and may not be manipulated.</p>
  </blockquote>
  
  <p>What I have noticed is in the page source initially the spinning wheel has <code>class='ngscope'</code> and after a while it changes to <code>class='ng-scope ng-hide'</code></p>
  
  <p>The whole thing is this: </p>
  
  <pre><code>&lt;div ng-show="Model.Busy" class="ng-scope ng-hide"&gt;
      &lt;div ng-class="{'control--inline': small, 'div-centre': !small}" class="div-centre"&gt;
      &lt;img ng-src="/assets/img/loading.gif" ng-class="{'very-small-loading': small}" src="/assets/img/loading.gif"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The piece of code that I'm using is:</p>
  
  <pre><code>describe('Testing', function() {
      browser.driver.manage().window().maximize();
  
    var username = element(by.model('Model.Username'));
    var password = element(by.model('Model.Password'));
    var loginbutton = element(by.css('[ng-click="Model.Logon()"]'));
  
  
    beforeEach(function() {
      browser.get('MY WEBSITE');
    });
  
    it('should log me in', function() {
  
  //  expect($('[ng-show=Model.Busy].ng-hide').isDisplayed()).toBeTruthy();  &lt;-- this fails
  
  
      username.clear();
      password.clear()
  
      username.sendKeys('1');
      password.sendKeys('2');
  
      loginbutton.click();
  
    });
  });
  </code></pre>
  
  <p>How to make this work?</p>