Currently working on selenium webdriver and the using the language Java.
Log.info(\"Clicking on To weekrange dropdown\");
JavascriptExecutor executor25 = (J
Try this:
new Select(driver.findElement(By.id("fromWeekYear")).selectByValue("2010");
new Select(driver.findElement(By.id("toWeek")).selectByValue("1");
Value is single, use value.
If by text, your text has space:
new Select(driver.findElement(By.id("fromWeekYear")).selectByVisibleText(" 2010");
new Select(driver.findElement(By.id("toWeek")).selectByVisibleText(" W 1");
Other issue is that maybe your space is (& nbsp;)
You have some spacing issues:
driver.findElement(By.id(" toWeek")));
Should not have a space in the id:
driver.findElement(By.id("toWeek")));