Question: how to get the selected value of dropdown in selenium webdriver java?
Answer: Select select = new Select(driver. findElement(By. xpath("//select"))); WebElement option = select. getFirstSelectedOption(); String defaultItem = option. getText(); System. out. println(defaultItem );