Cannot select item from drop down in Selenium IDE
<p>I'm writing a Selenium script that containing a drop down list.</p>

<pre><code>&lt;select id="seats" class="form-control" name="seats"&gt;
&lt;option value="1"&gt;1&lt;/option&gt;
&lt;option value="2"&gt;2&lt;/option&gt;
&lt;option value="3"&gt;3&lt;/option&gt;
&lt;option value="3"&gt;4&lt;/option&gt;
&lt;option value="5"&gt;5&lt;/option&gt;
&lt;option value="6"&gt;6&lt;/option&gt;
&lt;option value="7"&gt;7&lt;/option&gt;
&lt;option value="8"&gt;8&lt;/option&gt;
&lt;option value="9"&gt;9&lt;/option&gt;
&lt;option value="10"&gt;10&lt;/option&gt;
&lt;option value="11"&gt;11&lt;/option&gt;
&lt;option value="12"&gt;12&lt;/option&gt;
&lt;option value="13"&gt;13&lt;/option&gt;
&lt;option value="14"&gt;14&lt;/option&gt;
&lt;option value="15"&gt;15&lt;/option&gt;
&lt;option value="16"&gt;16&lt;/option&gt;
&lt;option value="17"&gt;17&lt;/option&gt;
&lt;option value="18"&gt;18&lt;/option&gt;
&lt;option value="19"&gt;19&lt;/option&gt;
&lt;option value="20"&gt;20&lt;/option&gt;
&lt;option value="21"&gt;22&lt;/option&gt;
&lt;option value="23"&gt;24&lt;/option&gt;
&lt;option value="25"&gt;25&lt;/option&gt;
&lt;option value="26"&gt;26&lt;/option&gt;
&lt;option value="27"&gt;27&lt;/option&gt;
&lt;option value="28"&gt;28&lt;/option&gt;
&lt;option value="29"&gt;29&lt;/option&gt;
&lt;option value="30"&gt;30&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>I've looked several answers in stack overflow to select a value form dropdown box and every time I failed. Even tried to get xpath from Selenium IDE. in that case I got same Relative XPath to both dropdown and the value.</p>

<p>Here is the code I'm currently using.</p>

<pre><code>driver.findElement(By.id("seats")).click();
driver.findElement(By.xpath("//form[@id='side-form']/div/div/div/div/div[3]/div/select")).click();
</code></pre>

<p>Here what i need to select is 4. but, it selecting 1.</p>

<p>Can someone tell me how to select 4 from my dropdown. Any help would be appreciated.</p>

<p>Thanks in advance. :)</p>