title: Select a drop down menu option using Selenium in Python
body: <p>I'm trying to select an option in a drop down menu using Selenium, but I couldn't figure it out how to handle this Timeout exception</p>
  
  <p>This is the html of the page:</p>
  
  <pre><code>&lt;select name="ctl00$ContentPlaceHolder1$ddUnidade" onchange="javascript:setTimeout(&amp;#39;__doPostBack(\&amp;#39;ctl00$ContentPlaceHolder1$ddUnidade\&amp;#39;,\&amp;#39;\&amp;#39;)&amp;#39;, 0)" id="ctl00_ContentPlaceHolder1_ddUnidade" class="form-control" style="width:100%;"&gt;
          &lt;option selected="selected" value=""&gt;-- SELECIONE --&lt;/option&gt;
          &lt;option value="1"&gt;MATRIZ&lt;/option&gt;
          &lt;option value="2"&gt;FILIAL&lt;/option&gt;
  
      &lt;/select&gt;
  </code></pre>
  
  <p>First I've tried this code:</p>
  
  <pre><code>select = Select(browser.find_element_by_id('ctl00_ContentPlaceHolder1_ddUnidade'))
  select.select_by_visible_text('MATRIZ')
  </code></pre>
  
  <p>Then I had this error:
  ElementNotInteractableException: Message: Element  could not be scrolled into view</p>
  
  <p>I googled and found out the WebDriverWait solution. So, I tried this code:</p>
  
  <pre><code>select = Select(browser.find_element_by_id('ctl00_ContentPlaceHolder1_ddUnidade'))
  WebDriverWait(browser, 10).until(EC.element_to_be_clickable((By.XPATH, "//select[@id='ctl00_ContentPlaceHolder1_ddUnidade']//options[contains(.,'MATRIZ')]")))
  select.select_by_visible_text('MATRIZ')
  </code></pre>
  
  <p>Then I had this:
  TimeoutException: Message: </p>
  
  <p>I googled again and there was another solution with EC.presence_of_element_located, but it didn't work either. I had the same TimeouException message.
  Does anybody know how to solve this?</p>