title: Protractor locator for formControlName
body: <p>I'm using model based forms where my form looks like:</p>
  
  <pre><code>&lt;form [formGroup]="form" (ngSubmit)="onSubmit(form.value)"&gt;
    &lt;input type="text" formControlName="username"&gt;
    &lt;input type="password" formControlName="password"&gt;
    &lt;button type="submit" [disabled]="!form.valid"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to write a protractor spec to test the login.  I would <em>like</em> to do something like the following in my spec:</p>
  
  <pre><code>    element(by.formControlName('username')).sendKeys('test@example.com');
  </code></pre>
  
  <p>This obviously doesn't work so is there a way to locate by form controls or am I resigned to the fact that I have to put a class or ID on the input fields?</p>