title: Selenium unable to locate element despite adding time.sleep()
body: <p>I wrote a script to find and click a button and it worked fine until today. I wonder what is causing:</p>
  <pre><code>selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;button[data-bind=&quot;click:selectLocation&quot;]&quot;}
  </code></pre>
  <p>I have tried adding time.sleep() just to make sure that I am waiting enough for the page to load but no, the error still shows up. Here is the html of the button:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="form-group"&gt;                    
   &lt;div class="col-xs-12"&gt;                       
     &lt;label data-bind="lang:searchSelectLocation"&gt;Select a location&lt;/label&gt;                        
    &lt;button type="button" class="btn btn-default btn-block text-left" data-bind="click:selectLocation"&gt;                            &lt;i class="fa fa-fw fa-map-marker-alt" data-bind="css:loadingLocation ? 'fa-spinner fa-spin' : 'fa-map-marker-alt'"&gt;&lt;/i&gt;&amp;nbsp;&lt;!--ko text: location ? location.name : $root.lang('searchSelectLocationOptions') --&gt;Cityname&lt;!--/ko--&gt;&lt;i class="fa fa-chevron-right pull-right"&gt;&lt;/i&gt;                        
    &lt;/button&gt;                  
   &lt;/div&gt;               
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>And here is the code snippet to find and click the button:</p>
  <pre><code>time.sleep(20)
  driver.find_element_by_css_selector('button[data-bind=&quot;click:selectLocation&quot;]').click()
  time.sleep(20)
  </code></pre>
  <p><strong>P.S I already had a wait before clicking as well. Sorry for missing it.</strong></p>