title: Selenium if driver.is_enabled(): doesn't work
body: <p>Hi everyone I have a task to do some scrape job from <a href="http://www.felgenoutlet.at/en" rel="nofollow noreferrer">this link</a>, the thing is I am trying by clicking to get to the final look of the page and that is table with some data, but sometimes it requires only one click and in the other hand it requires more than one. In that case I have tried by controlling with if statement in which I have said <strong>if</strong> element from final view of the page <strong>is_enabled()</strong>(I have tried also with <strong>is_displayed()</strong>) go to the function that prints out final page view. Please if you can help me because I don't how to solve this anymore. Here is my code</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  from selenium.common.exceptions import TimeoutException
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.common.exceptions import NoSuchElementException
  from selenium.common.exceptions import StaleElementReferenceException
  from selenium.common.exceptions import ElementNotInteractableException
  from bs4 import BeautifulSoup
  import time
  import urllib.request
  import re
  
  ignored_exceptions=(NoSuchElementException,StaleElementReferenceException)
  #Function that will do writing because I don't have these atrb in final page look as data
  def write(make,model,body,nesto):
      source = driver.page_source
      soup = BeautifulSoup(source, &quot;lxml&quot;)
      table = soup.find('table')
      table_rows = table.find_all('tr')
      for tr in table_rows:
          td = tr.find_all('td')
          scrape_list = [make,model,body,td]
          print(scrape_list)
  
  
  def not_normal():
      another_back = driver.find_element_by_class_name(&quot;btn btn-back pull-left kba_step_back&quot;)
      another_back.click()
      item_type_list = driver.find_element_by_class_name(&quot;kba_vehicle_type_group_id&quot;)
      item = item_type_list.find_element_by_tag_name(&quot;li&quot;)
      make = driver.find_element_by_class_name(&quot;make&quot;)
      model = driver.find_element_by_class_name(&quot;model&quot;)
      body = driver.find_element_by_class_name(&quot;body&quot;)
      item.click()
      another_back.click()
      write(make.text,model.text,body.text,item.text)
      while True:
          try:
              button_back = wait.until(EC.element_to_be_clickable((By.ID, &quot;back&quot;)))
              button_back.click()
          except TimeoutException:
              break
  
  driver = webdriver.Chrome(&quot;/home/cutie/Desktop/felgenoutlet/bin/chromedriver&quot;)
  driver.get(&quot;https://www.felgenoutlet.com/en&quot;)
  wait = WebDriverWait(driver, 3)
  #Opens webpage
  
  first_list = driver.find_element_by_class_name(&quot;kba_vehicle_trade_group_id&quot;)
  wait.until(EC.presence_of_all_elements_located((By.TAG_NAME,'li')))
  cars = first_list.find_elements_by_tag_name(&quot;li&quot;)
  for car in cars:
      car.click()
      try:
          final_view=driver.find_element_by_class_name(&quot;header_entry_list&quot;)
          if final_view.is_enabled():
              not_normal()
              continue
      except:
          print(&quot;not found&quot;, end='\n')
          second_list = driver.find_element_by_class_name(&quot;kba_vehicle_model_group_id&quot;)
          second_list_items= wait.until(EC.presence_of_all_elements_located((By.TAG_NAME,'li')))
  
          second_list_items = second_list.find_elements_by_tag_name(&quot;li&quot;)
          for model in second_list_items:
              model.click()
              try:
                  final_view=driver.find_element_by_class_name(&quot;header_entry_list&quot;)
                  if final_view.is_enabled():
                      not_normal()
                      continue
              except:
                  third_list = driver.find_element_by_class_name(&quot;kba_vehicle_body_group_id&quot;)
                  third_list_items= wait.until(EC.presence_of_all_elements_located((By.TAG_NAME,'li')))
                  third_list_items = third_list.find_elements_by_tag_name(&quot;li&quot;)
                  for body in third_list_items:
                      body.click()
                      try:
                          final_view=driver.find_element_by_class_name(&quot;header_entry_list&quot;)
                          if final_view.is_enabled():
                              not_normal()
                              continue
                      except:
                          fourth_list = driver.find_element_by_class_name(&quot;kba_vehicle_type_group_id&quot;)
                          fourth_list_items = wait.until(EC.presence_of_all_elements_located((By.TAG_NAME,'li')))
                          fourth_list_items = fourth_list.find_elements_by_tag_name(&quot;li&quot;)
                          for nesto in fourth_list_items:
                              make = driver.find_element_by_class_name(&quot;make&quot;).text
                              model = driver.find_element_by_class_name(&quot;model&quot;).text
                              body = driver.find_element_by_class_name(&quot;body&quot;).text
                              write(make,model,body,nesto.text)
                              nesto.click()
  </code></pre>
  <p>And here is my problematic if statement:</p>
  <pre><code>final_view=driver.find_element_by_class_name(&quot;header_entry_list&quot;)
                  if final_view.is_enabled():
                      not_normal()
                      continue
  </code></pre>
  <p>Any help would be appreciated
  <strong>UPDATE PROBLEM SOLVED SOON CODE SOLUTION WILL BE UPLOADED</strong></p>