title: Geckodriver error: "FirefoxWebElement has no len()"
body: <p>I installed geckodriver since selenium is no longer compatible with recent versions of Firefox. Please note that I am using Spyder on a Mac. Before, I had successfully scraped data from a website, but once I switched to geckodriver, I had to make modifications to the script. For example, </p>
  
  <pre><code> browser.find_by_id('closeMessageButton').click() 
  </code></pre>
  
  <p>is now</p>
  
  <pre><code> browser.find_element_by_id('closeMessageButton').click() 
  </code></pre>
  
  <p>I modified the following:</p>
  
  <pre><code>prov_count = len(browser.find_by_id("j_id48:j_id49:j_id108:cmbSecimCevresi").first.find_by_tag('option'))-1
  </code></pre>
  
  <p>to: </p>
  
  <pre><code>prov_count = len(browser.find_element_by_id("j_id48:j_id49:j_id108:cmbSecimCevresi").find_element_by_tag_name('option'))-1
  </code></pre>
  
  <p>but I get the following error: "TypeError: object of type 'FirefoxWebElement' has no len()"</p>
  
  <p>I am trying to get the count of the list on the following website and so I can loop through the list under "*Il adi": <a href="https://sonuc.ysk.gov.tr/module/sspsHalkoylamasiYeni.jsf" rel="nofollow noreferrer">https://sonuc.ysk.gov.tr/module/sspsHalkoylamasiYeni.jsf</a></p>