title: Css Selector button click with selenium (python)
body: <p>I am trying to click on a button using selenium. My code states it is unable to find the <code>css_selector</code> with said class name. The class name has spaces in it, which lead me to use the <code>css_selector</code> object. When I try to pass the class name in the 'css_selector' object, it fails since the class name is a string, which is not callable. The website is password protected otherwise I would share the full code. This is what I have so far.</p>
  <pre><code># Button I wish to click
  &lt;a href=&quot;#&quot; class=&quot;btn btn-alt see-full-list-btn&quot;&gt;See Full List&lt;/a&gt;
  # Once button is clicked, it changes to:
  &lt;a href=&quot;#&quot; class=&quot;btn btn-alt see-full-list-btn&quot; style=&quot;display: none;&quot;&gt;See Full List&lt;/a&gt;
  </code></pre>
  <p>What I have tried:</p>
  <pre><code>driver.find_element(By.CSS_SELECTOR(&quot;btn btn-alt see-full-list-btn&quot;)) # str object not callable
  driver.find_element(By.CSS_SELECTOR,&quot;btn btn-alt see-full-list-btn&quot;)
  # Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;btn btn-alt see-full-list-btn&quot;}
  </code></pre>