title: Selenium WeDriver C#: Not getting element locator of angular based application
body: <p>I need to get the locator of the input field. Attributes like id, name, text are not available. I get locator using xpath //*[@class='form-control validation-field ng-pristine ng-invalid ng-touched']   which doesn't seem to be the best practice.</p>
  
  <pre><code> &lt;input class="form-control validation-field ng-pristine ng-invalid ng-touched" type="text" step="undefined" min="undefined" max="undefined"&gt;
  </code></pre>
  
  <p>I am trying to automate an angular based application using Selenium WebDriver C#. </p>
  
  <pre><code>&lt;ng-component class="ng-star-inserted"&gt;
  &lt;form novalidate="" class="ng-pristine ng-invalid ng-touched"&gt;
      &lt;div class="form-group mb-0"&gt;
          &lt;input class="form-control validation-field ng-pristine ng-invalid ng-touched" type="text" step="undefined" min="undefined" max="undefined"&gt;
          &lt;!----&gt;&lt;small class="text-danger ng-star-inserted"&gt;Value is required&lt;/small&gt;
          &lt;!----&gt;
          &lt;!----&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/ng-component&gt;
  </code></pre>