title: if else loop on Python. Checking a class name with Selenium
body: <p>I have this appointment system where i have to wait till the link is available. If this link its availble then click it. If not back and foward (beacause the page doesn't let me reload ). And check it again till is available. </p>
  
  <pre><code>while True:
  
      if driver.find_element_by_class_name("linkButton"):
  
              #do somthing
  
  
  
      else:
  
               driver.back()
               driver.forward()
               #check again.
  </code></pre>
  
  <p>The program doesn't throw any error but when i force the <code>if</code> to be <code>false</code> the <code>else</code> just do nothing.</p>
  
  <p>I can't check it with the link that is not available because in the page is till available that's why i force the <code>if</code> to be <code>false</code></p>