title: Can't select from a dropdown menu with Selenium and Python
body: <p>Im really struggling with selecting an item from a drop down menu on a site I'm trying to scrape. The code for the HTML is shown below:</p>
  <pre><code>&lt;select id=&quot;averagesMP&quot; name=&quot;MP&quot; onchange=&quot;reQuery(this);&quot; style=&quot;width: 150px&quot;&gt;
         &lt;option value=&quot;&quot; selected=&quot;selected&quot;&gt;&lt;/option&gt;
         &lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
         &lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;
         &lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;
         &lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;
         &lt;option value=&quot;5&quot;&gt;5&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>I've tried everything I can think of and find on StackOverflow! I've noticed that this seems to work to select the actual drop down box:</p>
  <pre><code>select_mp = Select(driver.find_element_by_xpath(&quot;//select[@name='MP']&quot;)) 
  </code></pre>
  <p>but I only assume that works because the code runs and doesn't give any errors. However, I still can't select anything from the dropdown menu. I've tried:</p>
  <ul>
  <li>find_element_by_xpath/name/id/tag/value/text</li>
  <li>select_mp.select_by_value('2')</li>
  <li>select_mp.select_by_visible_text('2')</li>
  <li>select_mp.select_by_index(2)</li>
  <li>driver.find_element_by_xpath(&quot;//select[@name='MP']/option[@value='4']&quot;).click()</li>
  <li>driver.find_element_by_xpath(&quot;//option[@value='4']&quot;).click()</li>
  <li>driver.find_element_by_id('averagesMP').click()</li>
  </ul>
  <p>Does anyone have any advice? I know that this question seems to get asked alot on here, but I've tried everything I've seen in a post and its not working! It doesn't seem like a very complicated dropdown menu, only very elusive.</p>
  <p>Some helpful info:</p>
  <ul>
  <li><p>I'm using Safari and SafariDriver</p>
  </li>
  <li><p>I keep getting an error message of:</p>
  <pre><code>raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.WebDriverException: Message: 
  </code></pre>
  </li>
  </ul>