title: Locating a button by className with Protractor
body: <p>I apologize if this is a newbie question, just starting out with web automation testing.</p>
  
  <p>I want to test a login screen page. Finding the name and password textfields was easy (just used <em>by.model</em>), however I am having issues locating the login button with my script.</p>
  
  <p>I googled around and I should be able to find an element by className using <em>element(by.css(.className))</em>, however this fails to work and I am always getting    <code>NoSuchElementError: No element found using locator: By.cssSelector(".btn btn-lg btn-primary btn-block")</code>.</p>
  
  <p>Any idea what I am doing wrong?</p>
  
  <p>Thanks you in advance,</p>
  
  <p><strong>LoginBtn HTML:</strong></p>
  
  <pre><code>&lt;button class="btn btn-lg btn-primary btn-block" type="submit" ng-disabled="loading"&gt;login&lt;/button&gt;
  </code></pre>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>describe('Test login', function() {
    var username = element(by.model('formData.email'));
    var password = element(by.model('formData.password'));
    var loginBtn = element(by.css('.btn btn-lg btn-primary btn-block'));
  
  
    beforeEach(function() {
      browser.get('some site'); //hidden on purpose
    });
  
    it('should have a title', function() {
          username.sendKeys(1);
          password.sendKeys(2);
          loginBtn.click();
  
  
    });
  
  
  });
  </code></pre>