title: Selenium Python: How to select item from a dropdown
body: <p>I am able to open the dropdown menu however I am unable to click any option on the dropdown menu. This is the error I get: </p>
  
  <pre><code>selenium.common.exceptions.NoSuchElementException: Message: no such element: `Unable to locate element: {"method":"xpath","selector":"//*[@id="j_c40"]/li[3]"}`
  </code></pre>
  
  <p>This works fine by opening the dropdown menu:</p>
  
  <pre><code>self.driver.find_element_by_xpath("//span[@class='va-sm-m']").click()
  </code></pre>
  
  <p>This should press an option from the dropdown but gives me an error.</p>
  
  <pre><code>self.driver.find_element_by_xpath('//*[@id="j_c40"]/li[3]').click()
  </code></pre>
  
  <p>The code from the site from where I want to select looks like this:</p>
  
  <pre><code>&lt;li tabindex="0" data-size="EU M 39 / W 39" class="js-select size size-two-column ncss-brand va-sm-m d-sm-ib va-sm-t ta-sm-c " data-provide="sizes.1"&gt;&lt;span&gt;EU M 39 / W 39&lt;/span&gt;&lt;/li&gt;
  </code></pre>
  
  <p>What am I doing wrong here? </p>
  
  <p>Full code:</p>
  
  <pre><code>self.driver.get("https://www.nike.com/de/launch/")
      ui.WebDriverWait(self.driver, 100).until(EC.visibility_of_element_located((By.ID, "cookie-settings-layout")))
      element = self.driver.find_element_by_xpath('//*[@id="cookie-settings-layout"]/div/div/div/div[3]/div[2]/div').click()
      time.sleep(5)
      self.driver.find_element_by_xpath("//span[@class='va-sm-m']").click()
      time.sleep(5)
      self.driver.find_element_by_xpath('//*[@id="j_c40"]/li[3]').click()
  </code></pre>
  
  <p>Here is the link from the dropdown:</p>
  
  <pre><code>https://www.nike.com/de/launch/t/air-vapormax-utility-black-orange-peel
  </code></pre>