title: How to Access span element and change it's value
body: <p>I am trying to create a python + selenium script in order to fetch CSV from a salesforce pardot page.</p>
  
  <p>Can Somebody please help me in accessing the nested span element inside the dropdown list which will be generated on button click.</p>
  
  <p>I am adding my code done so far and I am getting Timeout Error While running my script.</p>
  
  <pre><code>from selenium import webdriver
  import time
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support import expected_conditions as EC
  from selenium import webdriver
  try:
      chrome_options = webdriver.ChromeOptions()
      prefs = {'download.default_directory': r'C:\Pardot'}
      chrome_options.add_experimental_option('prefs', prefs)
      driver = webdriver.Chrome(executable_path="D:\XXX XXXX\XXXX\drivers\chromedriver.exe", options=chrome_options)
      driver.get('https://pi.pardot.com/engagementStudio/studio#/15627/reporting')
      user_name = driver.find_element_by_css_selector('#email_address')
      user_name.send_keys('XXXXXXXXXXXXXXXXXXX')
      password = driver.find_element_by_css_selector('#password')
      password.send_keys('XXXXXXXXXXXXXXXXX)
      submit_button = driver.find_element_by_css_selector('input.btn')
      submit_button.click()
      WebDriverWait(driver, 10).until(
      EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR, "iframe#content-frame")))
      WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element_value(text_='All Time',locator=(By.CSS_SELECTOR,"span[data-qa='reporting-filter-trigger-value']")))
  
  except (RuntimeError) as e:
      print(e)
  finally:
      time.sleep(10)
      driver.close()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vLtLh.png" rel="nofollow noreferrer">Screenshot for span DOM element</a></p>
  
  <hr>
  
  <p><strong>Error Stack trace:</strong>  </p>
  
  <pre><code>C:\Users\Vipul.Garg\AppData\Local\Programs\Python\Python37\python.exe "D:/Vipul Garg Backup/XXXX/testingCSVfetching.py"
  Traceback (most recent call last):
    File "D:/Vipul Garg Backup/XXXX/testingCSVfetching.py", line 22, in &lt;module&gt;
      WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element_value(text_='All Time',locator=(By.CSS_SELECTOR,"span[data-qa='reporting-filter-trigger-value']")))
    File "C:\Users\Vipul.Garg\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until
      raise TimeoutException(message, screen, stacktrace)
  selenium.common.exceptions.TimeoutException: Message: 
  </code></pre>