title: Select a value from drop down using Selenium WebDriver C#
body: <p>I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition.
  I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried using this -</p>
  
  <pre><code>IWebElement dateOfBirth = webdriver.FindElement(By.Id("join_birth_day"));
  List&lt;IWebElement&gt; dateOfBirthOptions = (List&lt;IWebElement&gt;)dateOfBirth.FindElement(By.TagName("option"));
  
  foreach(IWebElement dateOfBirthOption in dateOfBirthOptions)  
  {
      if (dateOfBirthOption.Equals("3"))
      {
          dateOfBirthOption.Select();
      }
  }
  </code></pre>
  
  <p>But got to see error, when running my solution in NUnit</p>
  
  <pre><code>LiveCams.CreateAccount.createAccount:
  System.InvalidCastException : Unable to cast object of type 'OpenQA.Selenium.Firefox.FirefoxWebElement' to type 'System.Collections.Generic.List`1[OpenQA.Selenium.IWebElement]'.
  </code></pre>
  
  <p>And if I don't cast then would not be able to even build the solution.
  I guess I am missing some thing trivial here. Any one who could guide me here?
  Drop down selection used to be so simple in Selenium 1.0 :-/</p>