My code below is basically selecting the dropdown controls on the form. It works in debug mode but fails to select the dropdown values in run mode. Dont know why this is happening. The browser i am using chrome
new SelectElement(driver.FindElement(By.Id("ctl00_ctl00_Contents_Contents_dropdownlistday"))).SelectByText("9");
driver.FindElement(By.CssSelector("option[value=\"9\"]")).Click();
new SelectElement(driver.FindElement(By.Id("ctl00_ctl00_Contents_Contents_dropdownlistmonth"))).SelectByText("May");
driver.FindElement(By.CssSelector("option[value=\"May\"]")).Click();
new SelectElement(driver.FindElement(By.Id("ctl00_ctl00_Contents_Contents_dropdownlistyear"))).SelectByText("2000");
driver.FindElement(By.CssSelector("option[value=\"2000\"]")).Click();