title: Selecting value from dropdown using Python + Selenium
body: <p>Please help me with selecting a value from the dropdown. I was able to login to the website but unable to select a value from the dropdown list after logging in. I had tried few solutions/suggestions found online, but couldn't get that to work. Please see below for the code and error with HTML.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;select id="highlightunits" name="highlightunits"&gt;
  &lt;option selected="" value="px"&gt;Pixels&lt;/option&gt;
  &lt;option value="in"&gt;Inches&lt;/option&gt;
  &lt;option value="mm"&gt;Millimeters &lt;/option&gt;
  &lt;option value="cm"&gt;Centimeters&lt;/option&gt;
  &lt;/select&gt; &lt;/td&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code> from selenium.webdriver.chrome.webdriver import WebDriver
   from selenium.webdriver.common.by import By
   from selenium.webdriver.support.ui import WebDriverWait
   from selenium.webdriver.support import expected_conditions as EC
   from selenium.webdriver.support.ui import Select
   from selenium.webdriver.common.keys import Keys
  
  
   usernameStr = 'username'
   passwordStr = 'password'
   browser = webdriver.Chrome()
   browser.maximize_window()
   browser.get('mywebsite/')
   username = browser.find_element_by_id('username')
   username.send_keys(usernameStr)
   password = WebDriverWait(browser, 
   5).until(EC.presence_of_element_located((By.ID,'password')))
   password.send_keys(passwordStr)
   logInButton = browser.find_element_by_id('login_button')
   logInButton.click()
   file_input1 = browser.find_element_by_id('reference')
   file_input2 = browser.find_element_by_id('candidate')
   file_input1.send_keys("filelocation on my drive")
   file_input2.send_keys("filelocaton on my drive")
   s1= Select(browser.find_element_by_id('highlightunits'))
   print(s1.options)
   for option in s1.options:
     s1.select_by_visible_text('Inches')
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>[&lt;selenium.webdriver.remote.webelement.WebElement (session="3903b52d4ab75592fbd965a21424f192", element="0.5058773595053347-4")&gt;, &lt;selenium.webdriver.remote.webelement.WebElement (session="3903b52d4ab75592fbd965a21424f192", element="0.5058773595053347-5")&gt;, &lt;selenium.webdriver.remote.webelement.WebElement (session="3903b52d4ab75592fbd965a21424f192", element="0.5058773595053347-6")&gt;, &lt;selenium.webdriver.remote.webelement.WebElement (session="3903b52d4ab75592fbd965a21424f192", element="0.5058773595053347-7")&gt;]
  
  Traceback (most recent call last):
    File "C:\Users\Desktop\MyProjects\Applications\dropdown.py", line 26, in &lt;module&gt;
      s1.select_by_visible_text('Inches')
    File "C:\Python27\lib\site-packages\selenium\webdriver\support\select.py", line 120, in select_by_visible_text
      self._setSelected(opt)
    File "C:\Python27\lib\site-packages\selenium\webdriver\support\select.py", line 212, in _setSelected
      option.click()
    File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
      self._execute(Command.CLICK_ELEMENT)
    File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
      return self._parent.execute(command, params)
    File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
      self.error_handler.check_response(response)
    File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
      raise exception_class(message, screen, stacktrace)
  ElementNotVisibleException: Message: element not visible: Element is not currently visible and may not be manipulated
    (Session info: chrome=63.0.3239.132)
    (Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64)
  </code></pre>