title: Using Selenium and Python, how to check whether the button is still clickable?
body: <p>so I am doing some web scraping using Selenium with Python and I am  having a problem. I am clicking a Next button to move to the next page on a certain website, but I need to stop clicking it when I reach the last page. Now, my idea of doing it would be just to use some_element.click() in a try/except statement and wait until it gives me an error while the button is not clickable anymore. It seems though, .click() doesn't emit any signal of any kind, it doesn't throw an error when the button can't be clicked and it doesn't emit any true or false signal. </p>
  
  <p>a code snippet I tried using:</p>
  
  <pre><code>while True:
      try:
         button = driver.find_element_by_class_name('Next_button')
         button.click()
      except:
         break
  </code></pre>
  
  <p>Is there any other way? Thanks and cheers.</p>