title: Use protractor to test login on non-AngularJS page
body: <p>I have an AngularJS app which authenticates using oAuth SSO at GitHub. I am trying to figure out a way to use protractor and automate the login tests. I cannot figure out how to retrieve a non-angular field and how to manage wait'ing for the page to load with <code>browser.driver</code>, My spec looks like this:</p>
  
  <pre><code>// Create a repository                                                                                                                     
  describe('login', function() {
  
    it('should login', function() {
        // this issues a redirect to GitHub
        browser.driver.get( process.env.HOST + '/auth/github' ) 
        browser.sleep( 4000 ); // Sleep to make sure page loads fully..                                                                      
        // browser.debugger(); // tried to use debugger...                                                                                   
        var login = element( by.id( "login_field" ) );
        login.sendKeys( process.env.USERNAME );
        var password = element( by.id( "password" ) );
        password.sendKeys( process.env.PASSWORD )
    });                                                                                                                                      
  });
  </code></pre>
  
  <p>I run the command like this:</p>
  
  <pre><code>HOST=http://someserver.com.dev USERNAME=foobar PASSWORD=barfoo protractor config/protractor.conf 
  </code></pre>
  
  <p>How can I properly load the authenticate page, enter the correct information into the fields, and then wait for redirection back into my Angularized application (I can handle things from there). </p>
  
  <p>I tried to use the debugger to jump into this code, but it was not intuitive for me. When the debugger blocked, I did not seem to be inside my code, but inside of cli.js. If I hit 'c' then my script continued all the way to execution and failed without blocking further. Am I misunderstanding where to use the debugger command inside my script? And, from the Chrome inspector I hoped to to use  <code>window.clientSideScripts.findInputs</code> but was thwarted there as well; these seem to be for AngularJS elements, not elements which are not angularized.</p>