title: find_elements - Selenium (Python) : How to fill with nulls (or with other values) instead of blank
body: <p>Good morning,</p>
  <p>I am trying to do a web scraping project. I am expecting a list of 600 values after running the project but I get a list with 450 values.</p>
  <p>I am aware that FindElements will create a list with the found values but I am wondering if there is any way I can get a list with 600 values.</p>
  <p>I thought I could fill the not-found values with na, but I can't find the proper way. If I am not wrong, I should append a nan when i.text is empty. Here is my code:</p>
  <pre><code>def Prices():
      global prices
      global prices2
      prices=[]
      try:  
          for i in driver.find_elements_by_class_name('eur'):
              if i.text != &quot;&quot;:
                  prices.append(i.text)
              else:
                  prices.append(np.nan)
          print(prices)
      except NoSuchElementException as e:
          print (e)
          return prices
  
  </code></pre>
  <p>Then I thought. If I can't append a nan, maybe I can append another element. So I found another element to scrape, and used the following code:</p>
  <pre><code>    def Prices_function():
          prices=[]
          try:  
              for i in driver.find_elements_by_class_name('eur'):
                  if i.text != &quot;&quot;:   
                      prices.append(i.text)
                  else:
                      for i in driver.find_elements_by_class_name('eur_m'):
                          prices.append(i.text)        
  
        print(prices)
          except NoSuchElementException as e:
              print (e)
              return prices
  
  
  </code></pre>
  <p>But this code did not work either. I wonder why none of these codes work?</p>
  <p>Could anyone help me understand them?</p>
  <p>Thank you very much for your help!!</p>