title: Python: find_element_by_css_selector
body: <p>I am trying to click the login button with webdriver</p>
  
  <pre><code>&lt;a class="login-btn" href="javascript:;" data-bind="click:loginSection.loginClick"&gt;
      &lt;span class="btn-text"&gt;Login&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>submit=driver.find_element_by_css_selector('a.login-btn').click()
  </code></pre>
  
  <p>or try this code:</p>
  
  <pre><code>submit=driver.find_element_by_class_name('login-btn').click()
  </code></pre>
  
  <p>Neither of these is working, need some advice. Thanks in advance</p>
  
  <p>Error:</p>
  
  <pre><code>NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"a.login-btn"}
  </code></pre>