Question: how to select the value from dropdown in selenium?
Answer: selectByValue(): You can select an option by using Value attribute provided for each option in dropdown menu. So you can use this Value to select any particular option: WebElement element = driver. findElement(By.id("year")); Select select = new Select(element); select.